Skip to content

Commit

Permalink
fix: wait all jobs done (#1010)
Browse files Browse the repository at this point in the history
Signed-off-by: KevinWu0904 <KevinWu0904@outlook.com>
  • Loading branch information
KevinWu0904 committed Aug 26, 2021
1 parent 6e1246c commit f5c9553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dkron/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (s *Scheduler) Stop() {

if s.started {
s.logger.Debug("scheduler: Stopping scheduler")
s.Cron.Stop()
<- s.Cron.Stop().Done()
s.started = false
// Keep Cron exists and let the jobs which have been scheduled can continue to finish,
// even the node's leadership will be revoked.
Expand Down

0 comments on commit f5c9553

Please sign in to comment.