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

"Do not retry" from #31 #39

Merged
merged 3 commits into from
Nov 5, 2020
Merged

"Do not retry" from #31 #39

merged 3 commits into from
Nov 5, 2020

Conversation

taylorchu
Copy link
Owner

@nyergler

closes #17

nyergler and others added 3 commits September 22, 2020 17:02
Prior to this commit a job could fail in one of two ways: it could
fail with an Unrecoverable error, in which case it'd be ack'd and
removed from the queue; or it could fail with another error and be
retried with exponential backoff.

There are some situations where neither is desirable; for example, you
might want to delay processing a job by manually re-Enqueuing it
without exponential backoff.

This commit introduces a new error, ErrDoNotRetry, and makes
ErrUnrecoverable wrap it. Rather than testing for equality to
ErrUnrecoverable when determining if we should retry, we check if the
error Is (or wraps) ErrDoNotRetry.

This allows the handler (or more likely handler middleware) to more
precisely control the processing of a job.
@taylorchu taylorchu merged commit 695e2d5 into master Nov 5, 2020
@taylorchu taylorchu deleted the do-not-retry branch February 10, 2022 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Dequeue job by ID
2 participants