Skip to content
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

Preserve the task priority in case of a retry #5820

Merged
merged 3 commits into from
Nov 10, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion celery/app/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,13 @@ def signature_from_request(self, request=None, args=None, kwargs=None,
args = request.args if args is None else args
kwargs = request.kwargs if kwargs is None else kwargs
options = request.as_execution_options()
delivery_info = request.delivery_info or {}
priority = delivery_info.get('priority')
if priority is not None:
options['priority'] = priority
if queue:
options['queue'] = queue
else:
delivery_info = request.delivery_info or {}
exchange = delivery_info.get('exchange')
routing_key = delivery_info.get('routing_key')
if exchange == '' and routing_key:
Expand Down