Skip to content

Commit

Permalink
Include registration error in the log (#657)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
khash authored Nov 13, 2024
1 parent e14c312 commit 80479b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions periodic_task_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 80479b5

Please sign in to comment.