瀏覽代碼

Chord: Chords containing groups with iterators now work.

regen does not work with dequeue(regen(it)), as deque seems
to use some C magic instead of __iter__ for copying the list,
so the iterator ends up being consumed.
Ask Solem 9 年之前
父節點
當前提交
1de0d5d5ae
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      celery/canvas.py

+ 1 - 1
celery/canvas.py

@@ -939,7 +939,7 @@ class chord(Signature):
         )
 
     def _traverse_tasks(self, tasks, value=None):
-        stack = deque(tasks)
+        stack = deque(list(tasks))
         while stack:
             task = stack.popleft()
             if isinstance(task, group):