mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-03-24 14:15:07 +00:00
Address review: omit RunImmediately: false, add max 3 retries to backoff
Co-authored-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
This commit is contained in:
@@ -75,6 +75,7 @@ func (s *Scheduler) RegisterJob(ctx context.Context, name string, def gocron.Job
|
||||
return struct{}{}, origJob(ctx)
|
||||
},
|
||||
backoff.WithBackOff(opts.BackOff),
|
||||
backoff.WithMaxTries(3),
|
||||
backoff.WithNotify(func(err error, d time.Duration) {
|
||||
slog.WarnContext(ctx, "Job failed, retrying",
|
||||
slog.String("name", name),
|
||||
|
||||
Reference in New Issue
Block a user