-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
How to safely re-enqueue an aborted job? #485
Comments
I believe I've found the culprit of my problem. Calling
I'm willing to submit a PR if the issue is confirmed and the proposed resolution is accepted by the maintainers. |
hi, did you see if your line fixes the problem? |
I did very limited testing so take it for what it's worth. But yes, the fix seems to be working for me. |
@sashkent3 The enqueued job always be in queue until it taken for execution. Then how will it be not found while aborting. Can you explain the scenario in which the job is not found |
@SteniMariyaThomas well, nothing prevents the user from running |
I need to perform something similar to:
However, sometimes this can lead to the abort of the freshly enqueued job. From my observations, this always happens if the aborted job is not found.
Waiting until a key in the abort queue expires (1 minute, not configurable) seems to help.My questions are then:arq.constants.abort_job_max_age
guaranteed to be enough for the freshly enqueued job to not be aborted?job.status()
is a race condition.The text was updated successfully, but these errors were encountered: