mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-01-05 20:49:39 -06:00
Implemented the healthcheck scheduling system into the index.js
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user