From 690f734e423a6ebe55b3bef5b7ac42cc734b664f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 24 Jun 2024 07:53:42 -0700 Subject: Health check for stored messages --- src/main/java/org/traccar/database/StatisticsManager.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/java/org/traccar/database/StatisticsManager.java') diff --git a/src/main/java/org/traccar/database/StatisticsManager.java b/src/main/java/org/traccar/database/StatisticsManager.java index 8711289a0..d13f72793 100644 --- a/src/main/java/org/traccar/database/StatisticsManager.java +++ b/src/main/java/org/traccar/database/StatisticsManager.java @@ -178,6 +178,10 @@ public class StatisticsManager { } } + public synchronized int messageStoredCount() { + return messagesStored; + } + public synchronized int messageStoredCount(long deviceId) { return deviceMessages.getOrDefault(deviceId, 0); } -- cgit v1.2.3 From bea527412cfc6a20b385ba5d37fd40284923ee22 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 26 Jul 2024 07:13:34 -0700 Subject: Remove unnecessary stats parameter --- src/main/java/org/traccar/database/StatisticsManager.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/main/java/org/traccar/database/StatisticsManager.java') diff --git a/src/main/java/org/traccar/database/StatisticsManager.java b/src/main/java/org/traccar/database/StatisticsManager.java index d13f72793..5f4d97263 100644 --- a/src/main/java/org/traccar/database/StatisticsManager.java +++ b/src/main/java/org/traccar/database/StatisticsManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 - 2022 Anton Tananaev (anton@traccar.org) + * Copyright 2016 - 2024 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -100,8 +100,6 @@ public class StatisticsManager { statistics.setProtocols(protocols); } - statistics.set("modern", config.getString(Keys.WEB_PATH).contains("modern")); - users.clear(); deviceProtocols.clear(); deviceMessages.clear(); -- cgit v1.2.3