瀏覽代碼

[canvas] group | task now upgrades to chord early (Issue #2922)

Ask Solem 9 年之前
父節點
當前提交
fe60cab15a
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      celery/canvas.py

+ 2 - 0
celery/canvas.py

@@ -295,6 +295,8 @@ class Signature(dict):
     def __or__(self, other):
         if isinstance(other, group):
             other = maybe_unroll_group(other)
+        if isinstance(self, group):
+            return chord(self, body=other, app=self._app)
         if not isinstance(self, chain) and isinstance(other, chain):
             return chain((self,) + other.tasks, app=self._app)
         elif isinstance(other, chain):