【问题标题】:How to shutdown celery node如何关闭芹菜节点
【发布时间】:2018-10-18 04:09:15
【问题描述】:

我的芹菜日志显示这个错误:

UserWarning: A node named celery@postr 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))

如何关闭其他节点?

PS:有没有办法查看所有当前正在运行的节点?

【问题讨论】:

    标签: python django rabbitmq celery supervisord


    【解决方案1】:

    假设您使用的是 unix,您可以通过以下方式查看正在运行的进程:

    ps aux | grep celery
    

    这将显示为正在运行的进程 ID 的列表,例如。 1111、2222 和 3333。然后您可以通过发送TERM 信号来关闭 celery 进程:

    kill -TERM 1111 2222 3333
    

    根据您的配置,您的 celery 进程可能会产生多个子进程,您可以在 /var/run/celery.pid 之类的内容中看到父进程 ID

    见:https://docs.celeryproject.org/en/stable/userguide/workers.html#stopping-the-worker

    【讨论】:

      猜你喜欢
      • 2022-10-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-24
      • 2012-12-12
      • 2020-01-23
      • 2011-12-29
      • 1970-01-01
      相关资源
      最近更新 更多