芹菜 - 收到类型的未注册任务

时间:2015-06-24 20:03:52

标签: python celery

我试图从http://docs.celeryproject.org/en/latest/getting-started/first-steps-with-celery.html运行示例。它在本地工作正常,但是当我尝试在服务器上运行时,我得到了

[2015-06-24 19:55:39,758: ERROR/MainProcess] Received unregistered task of type '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?
Please see http://bit.ly/gLye1c for more information.

The full contents of the message body was:
{'utc': True, 'chord': None, 'args': (4, 4), 'retries': 0, 'expires': None, 'task': 'tasks.add', 'callbacks': None, 'errbacks': None, 'timelimit': (None, None), 'taskset': None, 'kwargs': {}, 'eta': None, 'id': '67f1dc13-e788-4558-a470-415288045eb2'} (209b)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer.py", line 455, in on_task_received
    strategies[name](message, body,
KeyError: 'tasks.add'

我在整个堆栈溢出中搜索并尝试了所有提到的解决方案,但仍然没有运气。

提前致谢

注意: Celery实际上是在找我的任务

[tasks]
  . tasks.add

所以我真的不明白问题是什么。

0 个答案:

没有答案