当我试图弄清楚 celery 是如何工作的,或者更具体地说是它如何与 Django 一起工作时,我将示例 CELERYBEAT_SCHEDULE 设置添加到我的设置文件中。它将 task.add 添加到我的任务队列中。我已经删除了该设置,但它一直在尝试添加该任务。我每天在哨兵中收到成千上万的错误报告,上面写着:
Received unregistered task of type u'tasks.add'.
The message has been ignored and discarded.
Did you remember to import the module containing this task?
Or maybe you are using relative imports?
More: http://docs.celeryq.org/en/latest/userguide/tasks.html#names
The full contents of the message body was:
{'utc': True, 'chord': None, 'args': [16, 16], 'retries': 0, 'expires': None, 'task': u'tasks.add', 'callbacks': None, 'errbacks': None, 'taskset': None, 'kwargs': {}, 'eta': None, 'id': '6d609a07-fbfa-4d6e-aa21-46e779c159c0'} (198b)
如何让 celetbeat 停止尝试添加此任务?