forked from celery/celery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a default value for retries in worker.strategy. (celery#5945)
* Added a default value for retries in worker.strategy. I was facing an issue when adding tasks directly to rabbitmq using pika instead of calling task.apply_async. The issue was the self.retry mechanisum was failing. In app/tasks.py the line `retries = request.retries + 1` was causing the issue. On further tracing I figured out that it was because the default .get value (None) was getting passed through this function and was raising TypeError: unsupported operand type(s) for +: 'NoneType' and 'int' * Add test cases for default and custom retries value
- Loading branch information
1 parent
c52105e
commit 8911ea9
Showing
2 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters