【发布时间】:2012-10-01 01:57:13
【问题描述】:
我可以使用 Celery Group 原语作为 map/reduce 工作流程中的总括任务吗?
或者更具体地说:组中的子任务可以在多个服务器上的多个工作人员上运行吗?
来自文档:
However, if you call apply_async on the group it will send a special
grouping task, so that the action of calling the tasks happens in a worker
instead of the current process
这似乎意味着任务都发送给一个工人......
在 3.0 之前(并且仍然是),可以触发一个任务集中的子任务,该任务集中将在多个服务器上运行。问题是确定是否所有任务都已完成执行。这通常是通过轮询所有不是很优雅的子任务来完成的。 我想知道是否可以使用 Group 原语来缓解这个问题。
【问题讨论】:
-
至少在 celery 3.1 中使用常规的
group命令完美地分配任务,似乎上述语句已从文档中删除
标签: celery