Implemented the healthcheck scheduling system into the index.js

This commit is contained in:
Mathias Wagner
2022-08-28 22:57:03 +02:00
parent ae2d9bef08
commit f7931a79dc

View File

@@ -1,6 +1,7 @@
const express = require('express');
const path = require('path');
const timerTask = require('./tasks/timer');
const healthCheckTask = require('./tasks/healthchecks');
const app = express();
const port = process.env.port || 5216;
@@ -49,6 +50,9 @@ const run = async () => {
timerTask.startTimer((await config.get("timeLevel")).value);
setInterval(async () => require('./tasks/speedtest').removeOld(), 60000);
// Start Healthchecks
healthCheckTask.startTimer();
// Make a speedtest
timerTask.runTask();