mirror of
https://github.com/hibiken/asynq.git
synced 2024-12-25 07:12: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 {
|
||||
entryID, err := mgr.s.Register(c.Cronspec, c.Task, c.Opts...)
|
||||
if err != nil {
|
||||
mgr.s.logger.Errorf("Failed to register periodic task: cronspec=%q task=%q",
|
||||
c.Cronspec, c.Task.Type())
|
||||
mgr.s.logger.Errorf("Failed to register periodic task: cronspec=%q task=%q err=%v",
|
||||
c.Cronspec, c.Task.Type(), err)
|
||||
continue
|
||||
}
|
||||
mgr.m[c.hash()] = entryID
|
||||
|
@ -334,7 +334,6 @@ func (s *Scheduler) beat() {
|
||||
}
|
||||
entries = append(entries, e)
|
||||
}
|
||||
s.logger.Debugf("Writing entries %v", entries)
|
||||
if err := s.rdb.WriteSchedulerEntries(s.id, entries, s.heartbeatInterval*2); err != nil {
|
||||
s.logger.Warnf("Scheduler could not write heartbeat data: %v", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user