芹菜:如何在一个集团内部经营一家连锁店?

时间:2014-03-28 16:55:14

标签: python celery

我尝试将多个芹菜链分组,如下所示:

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'

在组中运行链的正确方法是什么?

0 个答案:

没有答案