mirror of
https://github.com/hibiken/asynq.git
synced 2024-12-25 23:32:17 +08:00
Include registration error in the log (#657)
* Include registration error in the log * remove chatty debug log this will show in the logs every 5 seconds as debug (not even trace) which leads to a lot of noise
This commit is contained in:
parent
e14c312fe3
commit
80479b528d
@ -172,8 +172,8 @@ func (mgr *PeriodicTaskManager) add(configs []*PeriodicTaskConfig) {
|
|||||||
for _, c := range configs {
|
for _, c := range configs {
|
||||||
entryID, err := mgr.s.Register(c.Cronspec, c.Task, c.Opts...)
|
entryID, err := mgr.s.Register(c.Cronspec, c.Task, c.Opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
mgr.s.logger.Errorf("Failed to register periodic task: cronspec=%q task=%q",
|
mgr.s.logger.Errorf("Failed to register periodic task: cronspec=%q task=%q err=%v",
|
||||||
c.Cronspec, c.Task.Type())
|
c.Cronspec, c.Task.Type(), err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
mgr.m[c.hash()] = entryID
|
mgr.m[c.hash()] = entryID
|
||||||
|
@ -334,7 +334,6 @@ func (s *Scheduler) beat() {
|
|||||||
}
|
}
|
||||||
entries = append(entries, e)
|
entries = append(entries, e)
|
||||||
}
|
}
|
||||||
s.logger.Debugf("Writing entries %v", entries)
|
|
||||||
if err := s.rdb.WriteSchedulerEntries(s.id, entries, s.heartbeatInterval*2); err != nil {
|
if err := s.rdb.WriteSchedulerEntries(s.id, entries, s.heartbeatInterval*2); err != nil {
|
||||||
s.logger.Warnf("Scheduler could not write heartbeat data: %v", err)
|
s.logger.Warnf("Scheduler could not write heartbeat data: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user