Compare commits

...

3 Commits

Author SHA1 Message Date
Mohammed Sohail
7c3d57d30e fix: "only once" tasks should be recovered and retried on worker crash 2025-05-15 10:26:05 +03:00
Khash Sajadi
c327bc40a2 docs: Update server.go (#1010)
Typo in the docs
2025-04-01 09:06:12 +03:00
Broderick Westrope
ea0c6e93f0 chore: fix godoc comment (#1009) 2025-04-01 09:05:18 +03:00
2 changed files with 3 additions and 4 deletions

View File

@@ -95,7 +95,7 @@ func (r *recoverer) recoverLeaseExpiredTasks() {
return
}
for _, msg := range msgs {
if msg.Retried >= msg.Retry {
if msg.Retried >= msg.Retry && msg.Retry > 0 {
r.archive(msg, ErrLeaseExpired)
} else {
r.retry(msg, ErrLeaseExpired)

View File

@@ -174,16 +174,15 @@ type Config struct {
// })
//
// ErrorHandler: asynq.ErrorHandlerFunc(reportError)
//
// we can also handle panic error like:
// func reportError(ctx context, task *asynq.Task, err error) {
// if asynq.IsPanic(err) {
// if asynq.IsPanicError(err) {
// errorReportingService.Notify(err)
// }
// })
//
// ErrorHandler: asynq.ErrorHandlerFunc(reportError)
ErrorHandler ErrorHandler
// Logger specifies the logger used by the server instance.