Jelajahi Sumber

Canvas: group | group is now a chord

Ask Solem 10 tahun lalu
induk
melakukan
898affcf96
1 mengubah file dengan 1 tambahan dan 2 penghapusan
  1. 1 2
      celery/canvas.py

+ 1 - 2
celery/canvas.py

@@ -436,8 +436,7 @@ class chain(Signature):
                 # splice the chain
                 # splice the chain
                 steps.extendleft(reversed(task.tasks))
                 steps.extendleft(reversed(task.tasks))
                 continue
                 continue
-            elif isinstance(task, group) and steps and \
-                    not isinstance(steps[0], group):
+            elif isinstance(task, group) and steps:
                 # automatically upgrade group(...) | s to chord(group, s)
                 # automatically upgrade group(...) | s to chord(group, s)
                 try:
                 try:
                     next_step = steps.popleft()
                     next_step = steps.popleft()