Commit 72f358fc authored by Philippe Pepiot's avatar Philippe Pepiot
Browse files

Detect celery workflow meta tasks with task.type instead of hasattr

This make code more readable and less error prone.
parent 1535d4229beb
......@@ -257,11 +257,11 @@ class CeleryTaskAdapter(ICeleryTask):
if hasattr(task, 'body'):
self.attach_task(task.body, seen, parent)
if hasattr(task, 'tasks'):
if in ('celery.chord', 'celery.chain', ''):
for subtask in task.tasks:
self.attach_task(subtask, seen, parent)
if == 'celery.chord':
self.attach_task(task.body, seen, parent)
def get_task(self, name, *args, **kwargs):
task = super(CeleryTaskAdapter, self).get_task(
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