fix(core): update
This commit is contained in:
parent
725102d02c
commit
ac2edd6d74
@ -44,4 +44,4 @@
|
|||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 1 chrome versions"
|
"last 1 chrome versions"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -64,8 +64,12 @@ export class CronManager {
|
|||||||
* stops all cronjobs
|
* stops all cronjobs
|
||||||
*/
|
*/
|
||||||
public stop() {
|
public stop() {
|
||||||
this.status = 'stopped';
|
if (this.status === 'started') {
|
||||||
this.executionTimeout.cancel();
|
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()) {
|
for (const cron of this.cronjobs.getArray()) {
|
||||||
cron.stop();
|
cron.stop();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user