0
我想在我的代码中增量构建Celery任务的group,因为我将根据循环中的逻辑创建任务。如何将任务添加到Celery中的组?
例如:
my_group = group()
for item in items:
if item.is_special():
# This doesn't work...
my_group.add(special_processing.s(item.id))
else:
my_group.add(regular_processing.s(item.id))
res = my_group()
我读过群体是谐音,这是很好的,但你怎么结合的谐音,让他们组成一个小组?
它工作吗? – HereHere
我不知道,但我不明白为什么它不起作用。 – mlissner