fix(core): update

This commit is contained in:
Philipp Kunz 2020-09-02 14:09:21 +00:00
parent 725102d02c
commit ac2edd6d74
2 changed files with 7 additions and 3 deletions

View File

@ -44,4 +44,4 @@
"browserslist": [
"last 1 chrome versions"
]
}
}

View File

@ -64,8 +64,12 @@ export class CronManager {
* stops all cronjobs
*/
public stop() {
this.status = 'stopped';
this.executionTimeout.cancel();
if (this.status === 'started') {
this.status = 'stopped';
this.executionTimeout.cancel();
} else {
console.log(`You tried to stop a CronManager that was not actually started.`);
}
for (const cron of this.cronjobs.getArray()) {
cron.stop();
}