是每个任务或每次调用任务的芹菜消息格式的ID吗?

时间:2013-05-03 16:56:13

标签: python protocols celery

我在Celery协议文档(http://docs.celeryproject.org/en/latest/internals/protocol.html)中看到邮件中有ID。它说它是“任务的唯一ID(UUID)”

每次调用任务时,这真的应该是一样的吗?或者它是任务特定调用的ID?

换句话说,如果我两次调用任务“dod.airforce.launch_the_nukes”,那么2个调用是否具有相同的UUID,不同的UUID?

1 个答案:

答案 0 :(得分:2)

如果未使用task_id参数,则每个任务调用都会生成一个新的uuid。

$ python tasks.py call tasks.add --args='[1,2]'
96307fbd-81be-4e1d-964b-fb11425c60db
$ python tasks.py call tasks.add --args='[1,2]'
d4d250e0-5f6c-464d-96bf-f84435e0f4d6
相关问题