删除的任务仍然显示在芹菜中

时间:2018-05-08 07:26:20

标签: python django rabbitmq celery supervisord

我已经完全删除了settings.pycelery.pytasks.py中芹菜任务的所有记录,除了名为test_post的芹菜任务。

但是,在我的celery.log文件中仍然显示与旧任务相关的错误:

[2018-05-08 07:23:05,115: ERROR/MainProcess] Received unregistered task of type 'post_jobs'.
The message has been ignored and discarded.

Did you remember to import the module containing this task?
Or maybe you're using relative imports?

Please see
http://docs.celeryq.org/en/latest/internals/protocol.html
for more information.

The full contents of the message body was:
'[[], {}, {"chord": null, "chain": null, "errbacks": null, "callbacks": null}]' (77b)
Traceback (most recent call last):
  File "/home/james/postr/env/lib/python3.5/site-packages/celery/worker/consumer/consumer.py", line 561, in on_task_received
    strategy = strategies[type_]
KeyError: 'post_jobs'

为什么会发生这种情况,我该如何解决?

我已经尝试过celery -A myapp purge但它没有做任何事情。

0 个答案:

没有答案