Skip to content

Commit bb0fb4a

Browse files
committed
Merge branch 'rossdeane/master'
2 parents 953c914 + 452d388 commit bb0fb4a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

celery/canvas.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,9 @@ def apply(self, args=(), kwargs={}, **options):
466466
def from_dict(self, d, app=None):
467467
tasks = d['kwargs']['tasks']
468468
if d['args'] and tasks:
469+
# make sure that tasks are made into signatures (Issue #2076)
470+
if not isinstance(tasks[0], Signature):
471+
tasks[0] = signature(tasks[0])
469472
# partial args passed on to first task in chain (Issue #1057).
470473
tasks[0]['args'] = tasks[0]._merge(d['args'])[0]
471474
return chain(*d['kwargs']['tasks'], app=app, **d['options'])
@@ -591,6 +594,9 @@ def from_dict(self, d, app=None):
591594
if d['args'] and tasks:
592595
# partial args passed on to all tasks in the group (Issue #1057).
593596
for task in tasks:
597+
# make sure that tasks are made into signatures (Issue #2076)
598+
if not isinstance(tasks[0], Signature):
599+
task = signature(task)
594600
task['args'] = task._merge(d['args'])[0]
595601
return group(tasks, app=app, **d['options'])
596602

0 commit comments

Comments
 (0)