【发布时间】:2011-05-31 08:08:11
【问题描述】:
这是我的代码:
我的任务
from celery.decorators import task
@task()
def add(x, y):
return x + y
使用我的任务
from core.tasks import add
results = []
for i in range(100):
results.append(add.delay(i, i))
问题 1
几秒钟后,我执行以下操作:
for result in results:
print result.result
打印这个:
(这些值不会以看起来像模式的形式返回)
None
None
None
None
8
None
None
None
None
18
None
None
None
None
28
None
None
None
None
38
...
第二次干净的操作系统安装+设置:
一切都按预期工作,仍然不确定这里发生了什么......
Django 管理界面中的任务也随机丢失...
有人知道发生了什么吗? :|
【问题讨论】:
标签: python django message-queue celery