-
Notifications
You must be signed in to change notification settings - Fork 4
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
AbortException leaves an orphaned job file in the queue #20
Comments
I confirm that this is a bug. |
I had an initial look to see if I can figure out the problem and didn't get anywhere. We could try setting |
Anyway it would be nice to get this fixed and then we can do a release with the other change I just added. |
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
Spinach tasks with retries set do not clean themselves up completely if the job throws an
AbortException
. This is easiest to demonstrate with theRedisBroker
:Steps to reproduce
KEYS spinach/_running*
Expected result
Actual behavior
The job file remains in the queue, e.g.:
Errata
Tasks that do not set
max_retries
appear to clean themselves up properly.The text was updated successfully, but these errors were encountered: