zoukankan      html  css  js  c++  java
  • 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 命令
    关闭一个命令就好了




  • 相关阅读:
    7. Scrapy的高级用法
    6. Scrapy的基本用法
    5. 基于Selenium实现爬虫
    4. 异步爬虫
    3. 数据解析
    2. requests的使用
    1. 爬虫概述
    03-Servlet初识
    Flask框架基础(1)
    登录mysql时,报错ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
  • 原文地址:https://www.cnblogs.com/baiyifengyun/p/12446498.html
Copyright © 2011-2022 走看看