首页 > 其他 > 详细

celery起动,运行有警告

时间:2020-03-09 09:22:00      阅读:636      评论:0      收藏:0      [点我收藏+]

运行命令 :  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 命令
关闭一个命令就好了




celery起动,运行有警告

原文:https://www.cnblogs.com/baiyifengyun/p/12446498.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!