override_max_retries is never deleted from task #8834
marcelombj
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm implementing a decorator to retry if two tasks are running simultaneously. For this decorator, the approach that I found to schedule later is the retry mechanism with max_retries + number_or_retries_of_this_decorator. I don't want this retry to impact the original max_retries from the original implementation.
But during the tests with multiple treads, I realized that the code below is never reached, and the override_max_retries variable is reused for different tasks.
https://github.com/celery/celery/blob/main/celery/app/autoretry.py#L62-L63
I'm wondering if this is a bug or if I'm doing something wrong. But if I use the max_retry of retry fun for one task and run again another one, I'm retrying more than it should the second.
Beta Was this translation helpful? Give feedback.
All reactions