publish v1.5.1
This commit is contained in:
parent
d5d638f0d8
commit
307ac38346
@ -73,11 +73,6 @@ func (s *Scheduler) Start(ctx context.Context, logger *log.Logger) error {
|
|||||||
s.mu.Unlock()
|
s.mu.Unlock()
|
||||||
|
|
||||||
s.cron.Start()
|
s.cron.Start()
|
||||||
if logger != nil {
|
|
||||||
logger.Info("scheduler started")
|
|
||||||
} else {
|
|
||||||
log.DefaultLogger.Info("scheduler started")
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,10 +104,8 @@ func (s *Scheduler) Stop(ctx context.Context) error {
|
|||||||
|
|
||||||
select {
|
select {
|
||||||
case <-done:
|
case <-done:
|
||||||
log.DefaultLogger.Info("scheduler stopped gracefully")
|
|
||||||
return nil
|
return nil
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
log.DefaultLogger.Warning("scheduler stop timed out or cancelled", "err", ctx.Err())
|
|
||||||
return ctx.Err()
|
return ctx.Err()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user