我尝试将多个芹菜链分组,如下所示:
my_flow = group(chain(task1.s() | task2.s())(item) for item in items)
当我呼叫my_flow()
时,工作人员正确执行了任务,但它引发了异常:
File "/Library/Python/2.7/site-packages/celery/canvas.py", line 507, in __call__
return self.apply_async(partial_args, **options)
File "/Library/Python/2.7/site-packages/celery/canvas.py", line 484, in apply_async
type = self.type
File "/Library/Python/2.7/site-packages/celery/canvas.py", line 547, in type
app = self._app if self._app else self.tasks[0].type.app
AttributeError: 'AsyncResult' object has no attribute 'type'
在组中运行链的正确方法是什么?