mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-05-24 06:58:38 -05:00
Added a function to stop the healthchecks timer
This commit is contained in:
@@ -51,4 +51,12 @@ module.exports.sendRunning = async () => {
|
||||
// Starts a timer which sends a ping every minute
|
||||
module.exports.startTimer = () => {
|
||||
job = schedule.scheduleJob('* * * * *', () => this.sendCurrent());
|
||||
}
|
||||
|
||||
// Stops the timer
|
||||
module.exports.stopTimer = () => {
|
||||
if (job !== undefined) {
|
||||
job.cancel();
|
||||
job = undefined;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user