2
我有這種情況:可能的芹菜任務死鎖?
tasks.py
@task
def add(a,b):
return a+b
@task
def other():
chunks = [1,1,1,1] # dummy data
for index in range(3):
# wait for each group to finish then continue to the next one
res = group(add.s(i,i) for i in chunks).apply_async()
# sleep for 1 second if group is not ready
while not res.get():
time.sleep(1)
難道這導致死鎖在等待組任務的完成?即使在只有一名芹菜工的理論情況下?