Sfoglia il codice sorgente

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

Ask Solem 9 anni fa
parent
commit
fe60cab15a
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  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):