aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-12-02 05:15:49 +0300
committereug-vs <eug-vs@keemail.me>2020-12-02 05:15:49 +0300
commit10433d9d37452ed453272e12acc6012c1c15229d (patch)
treedf26caa44b1c70623518542eba122efb28a9238e /lib
parent4d35fe77fec445c3606adf383967ba1ddfcbdb56 (diff)
downloadmongo-cronjob-10433d9d37452ed453272e12acc6012c1c15229d.tar.gz
fix: stop all jobs along with polling
Diffstat (limited to 'lib')
-rw-r--r--lib/scheduler.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/scheduler.ts b/lib/scheduler.ts
index d6b28e9..e1437bd 100644
--- a/lib/scheduler.ts
+++ b/lib/scheduler.ts
@@ -31,9 +31,10 @@ class Scheduler {
public startPolling() {
this.pollingJob.start();
}
-
+
public stopPolling() {
this.pollingJob.stop();
+ this.stopAllJobs();
}
private startAllJobs() {