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

Make the Redis broker clean up aborted jobs #23

Merged
merged 1 commit into from
May 2, 2022

Conversation

0xDEC0DE
Copy link
Contributor

The Redis broker uses a non-zero value for max_retries to determine if it should remove a job from the "running" state. So when an AbortException is thrown, max out the job.retries counter, rather than zeroing out the job.max_retries counter. This will have the same effect, but play more nicely with what the Redis broker is expecting.

The MemoryBroker is unaffected by this.

Fixes Issue #20

The Redis broker uses a non-zero value for `max_retries` to determine
if it should remove a job from the "running" state.  So when an
`AbortException` is thrown, max out the `job.retries` counter,
rather than zeroing out the `job.max_retries` counter.  This will
have the same effect, but play more nicely with what the Redis
broker is expecting.

The MemoryBroker is unaffected by this.

Fixes Issue NicolasLM#20
@0xDEC0DE
Copy link
Contributor Author

@bigjools bigjools merged commit 7c8c0c6 into NicolasLM:master May 2, 2022
@0xDEC0DE 0xDEC0DE deleted the issue/20 branch May 11, 2022 19:34
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.

3 participants