fix: Change retry logic to extract next run from traceback #111
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
task_meta.result
is an Exception for me with Celery v5.2.5, I can't grasp where result.when would come from. The retry logic simply does not work as the result is an Exception and does not have any fields indicating when the next run is. Accessingwhen
just crashes the progress bar and returns a 500 error.Still kept it in and checked if it's iterable, maybe it works for others.
Here's a PR that works for me, if there's other solutions let me know. But atm retries are causing 500 errors.