2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-12-26 07:42: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:
Khash Sajadi 2024-11-13 03:09:59 -08:00 committed by GitHub
parent e14c312fe3
commit 80479b528d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -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

View File

@ -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)
} }