aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-04-14 18:12:10 -0700
committerAnton Tananaev <anton@traccar.org>2022-04-14 18:12:10 -0700
commitef8cfea50d6ca763a4af6eb75287325e91f5f5ca (patch)
tree96b64185a6d461f60dfe2b6e9f4db973c074f89e /src
parentf5dcafaf60fd41c5a2cd587e9ecf40e67d235d59 (diff)
downloadtrackermap-server-ef8cfea50d6ca763a4af6eb75287325e91f5f5ca.tar.gz
trackermap-server-ef8cfea50d6ca763a4af6eb75287325e91f5f5ca.tar.bz2
trackermap-server-ef8cfea50d6ca763a4af6eb75287325e91f5f5ca.zip
Change health check package
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/schedule/ScheduleManager.java3
-rw-r--r--src/main/java/org/traccar/schedule/TaskHealthCheck.java (renamed from src/main/java/org/traccar/api/HealthCheckService.java)8
2 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/schedule/ScheduleManager.java b/src/main/java/org/traccar/schedule/ScheduleManager.java
index a1679717f..7a3d33b85 100644
--- a/src/main/java/org/traccar/schedule/ScheduleManager.java
+++ b/src/main/java/org/traccar/schedule/ScheduleManager.java
@@ -16,7 +16,6 @@
package org.traccar.schedule;
import org.traccar.LifecycleObject;
-import org.traccar.api.HealthCheckService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
@@ -31,7 +30,7 @@ public class ScheduleManager implements LifecycleObject {
new TaskDeviceInactivityCheck().schedule(executor);
new TaskWebSocketKeepalive().schedule(executor);
- new HealthCheckService().schedule(executor);
+ new TaskHealthCheck().schedule(executor);
}
@Override
diff --git a/src/main/java/org/traccar/api/HealthCheckService.java b/src/main/java/org/traccar/schedule/TaskHealthCheck.java
index 8a17c8798..087cd3e63 100644
--- a/src/main/java/org/traccar/api/HealthCheckService.java
+++ b/src/main/java/org/traccar/schedule/TaskHealthCheck.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.traccar.api;
+package org.traccar.schedule;
import com.sun.jna.Library;
import com.sun.jna.Native;
@@ -25,16 +25,16 @@ import org.traccar.config.Keys;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
-public class HealthCheckService implements Runnable {
+public class TaskHealthCheck implements Runnable {
- private static final Logger LOGGER = LoggerFactory.getLogger(HealthCheckService.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(TaskHealthCheck.class);
private SystemD systemD;
private boolean enabled;
private long period;
- public HealthCheckService() {
+ public TaskHealthCheck() {
if (!Context.getConfig().getBoolean(Keys.WEB_DISABLE_HEALTH_CHECK)
&& System.getProperty("os.name").toLowerCase().startsWith("linux")) {
try {