Commit a5d5d619 authored by Philippe Pepiot's avatar Philippe Pepiot
Browse files

Use frozen task id in run_all_tasks()

This code is only used in tests where we check for existence of task_id in database.
Before running the Task, there is no guarantees that the value of will
be used as task_id, this is the purpose of freeze().
In this particular case = Task.freeze().id for celery 3.1.25, but this
is no longer true in celery 4.
parent 3f7ecef9e1e0
......@@ -53,7 +53,7 @@ def run_all_tasks(cnx):
# Ensure current task id is in the scope of the current test
if is not None and not cnx.execute(
'Any X WHERE X is CeleryTask, X task_id %(task_id)s',
{'task_id': task.freeze().id}
results[task_eid] = task.delay()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment