celery起动,运行有警告


运行命令 :  celery worker -A task_log -l info: 有如下警告

2019-12-22 22:42:50,215: WARNING/MainProcess] /root/miniconda3/lib/python3.7/site-packages/kombu/pidbox.py:74: UserWarning: A node named celery@Linux is already using this process mailbox!

Maybe you forgot to shutdown the other node or did not do so properly?
Or if you meant to start multiple nodes on the same host please make sure
you give each node a unique node name!

  warnings.warn(W_PIDBOX_IN_USE.format(node=self))
运行脚本 有如下报错:
[2019-12-22 22:42:57,274: ERROR/MainProcess] Received unregistered task of type 'task_log.worker'.
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:
'[["log"], {}, {"callbacks": null, "errbacks": null, "chain": null, "chord": null}]' (82b)
Traceback (most recent call last):
  File "/root/miniconda3/lib/python3.7/site-packages/celery/worker/consumer/consumer.py", line 559, in on_task_received
    strategy = strategies[type_]
KeyError: 'task_log.worker'
启动程序,应该是输出三次,结果输出一次或者一次也没有输出卡在那里
原因:运行了两次celery worker 命令
关闭一个命令就好了


来自为知笔记(Wiz)


posted on 2020-03-09 02:49  白衣风云  阅读(1112)  评论(2编辑  收藏  举报

导航