Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include registration error in the log #657

Merged
merged 3 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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)

Check warning on line 176 in periodic_task_manager.go

View check run for this annotation

Codecov / codecov/patch

periodic_task_manager.go#L175-L176

Added lines #L175 - L176 were not covered by tests
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