我已经完全删除了settings.py
,celery.py
和tasks.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
但它没有做任何事情。