aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/Main.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-04-14 18:10:56 -0700
committerAnton Tananaev <anton@traccar.org>2022-04-14 18:10:56 -0700
commitf5dcafaf60fd41c5a2cd587e9ecf40e67d235d59 (patch)
tree991bde6884672a1abb03befe0d8c52e822b0acfc /src/main/java/org/traccar/Main.java
parent437a7651096ecdd8e9cabeeca760b9af89b10458 (diff)
downloadtrackermap-server-f5dcafaf60fd41c5a2cd587e9ecf40e67d235d59.tar.gz
trackermap-server-f5dcafaf60fd41c5a2cd587e9ecf40e67d235d59.tar.bz2
trackermap-server-f5dcafaf60fd41c5a2cd587e9ecf40e67d235d59.zip
Use schedule manager for health check
Diffstat (limited to 'src/main/java/org/traccar/Main.java')
-rw-r--r--src/main/java/org/traccar/Main.java12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/main/java/org/traccar/Main.java b/src/main/java/org/traccar/Main.java
index 570f3c6ad..6daf72bb4 100644
--- a/src/main/java/org/traccar/Main.java
+++ b/src/main/java/org/traccar/Main.java
@@ -19,7 +19,6 @@ import com.google.inject.Guice;
import com.google.inject.Injector;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.traccar.api.HealthCheckService;
import java.io.File;
import java.lang.management.ManagementFactory;
@@ -31,7 +30,6 @@ import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
-import java.util.Timer;
public final class Main {
@@ -110,14 +108,6 @@ public final class Main {
}
}
- private static void scheduleHealthCheck() {
- HealthCheckService service = new HealthCheckService();
- if (service.isEnabled()) {
- new Timer().scheduleAtFixedRate(
- service.createTask(), service.getPeriod(), service.getPeriod());
- }
- }
-
public static void run(String configFile) {
try {
Context.init(configFile);
@@ -137,8 +127,6 @@ public final class Main {
service.start();
}
- scheduleHealthCheck();
-
Thread.setDefaultUncaughtExceptionHandler((t, e) -> LOGGER.error("Thread exception", e));
Runtime.getRuntime().addShutdownHook(new Thread(() -> {