简体   繁体   English

如何通过芹菜自我重启芹菜

[英]How to restart celery by celery it self

I have celery workers running if different network. 如果有不同的网络,我有芹菜工人在运行。 All of them using the same rabbitmq server. 他们都使用相同的rabbitmq服务器。 I want to know how to notify each worker to upgrade to the latest version?. 我想知道如何通知每个工作人员升级到最新版本吗? I did't find a way to do this. 我没有找到一种方法来做到这一点。

multi restart have to run outside of the worker. 多次重启必须在工作程序外部运行。

auto reload didn't working. 自动重新加载无效。

I don't know what happens after broadcast the pool_restart command. 我不知道广播pool_restart命令后会发生什么。

Do I have to shut them down and use supervisord to restart them? 我是否必须关闭它们并使用超级用户来重新启动它们?

Here is my request: 这是我的要求:

task add return x + y 任务添加返回x + y

After I start the worker, I change the task add to return x + y + 1 启动工作程序后,我将添加的任务更改为返回x + y + 1

but the result still be x + y. 但结果仍然是x + y。

pool restart didn't work. 池重启无效。

I believe the --autoreload is the flag you want 我相信--autoreload是您想要的标志

http://celery.readthedocs.org/en/latest/userguide/workers.html http://celery.readthedocs.org/en/latest/userguide/workers.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM