We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi everyone!
I need to cancel my task without retry. I call CancelProcessing for this. CancelProcessing calls task's cancel function. At my handler I do this:
CancelProcessing
cancel
select { case <-ctx.Done(): return asynq.SkipRetry case: ... }
But this does no effect as far as at processor.go at
processor.go
select { case <-p.abort: // time is up, push the message back to queue and quit this worker goroutine. p.logger.Warnf("Quitting worker. task id=%s", msg.ID) p.requeue(lease, msg) return case <-lease.Done(): cancel() p.handleFailedMessage(ctx, lease, msg, ErrLeaseExpired) return case <-ctx.Done(): p.handleFailedMessage(ctx, lease, msg, ctx.Err()) return case resErr := <-resCh: if resErr != nil { p.handleFailedMessage(ctx, lease, msg, resErr) return } p.handleSucceededMessage(lease, msg) }
case <-ctx.Done() read from channel occurs before case resErr := <-resCh
case <-ctx.Done()
case resErr := <-resCh
And due to this we have no opportunity to skip retry when publish cancelation, is this right?
The text was updated successfully, but these errors were encountered:
Possibly the same as #968
Sorry, something went wrong.
Fixed this at #988
hibiken
kamikazechaser
No branches or pull requests
Hi everyone!
I need to cancel my task without retry. I call
CancelProcessing
for this.CancelProcessing
calls task'scancel
function. At my handler I do this:But this does no effect as far as at
processor.go
atcase <-ctx.Done()
read from channel occurs beforecase resErr := <-resCh
And due to this we have no opportunity to skip retry when publish cancelation, is this right?
The text was updated successfully, but these errors were encountered: