2016-06-09 27 views
4

首先 - 我知道UWSGI建议使用smart-attach-daemon我应该使用附加守护进程或智能连接守护程序自动启动芹菜UWSGI(地更新任务)

来自:http://uwsgi-docs.readthedocs.io/en/latest/AttachingDaemons.html

Managing celery: 

[uwsgi] 
master = true 
socket = :3031 
smart-attach-daemon = /tmp/celery.pid celery -A tasks worker --pidfile=/tmp/celery.pid 

然而,看起来当我将更新推送到服务器时,Celery任务不会更新 - 为了实现这一点,我似乎做了killall celery问题 - 它似乎实际上会自动使用attach-daemon来启动它?

我在这里错过了什么,有没有比杀掉芹菜实例或使用attach-daemon更好的解决方案?

回答

4

您最好使用attach-daemon,因为smart-attach-daemon意味着您将自行管理您的智能守护程序重新启动。

由于uwsgi 2.0也有'attach-daemon2'其中touch选项。

+0

接受答案 - 因为它是我最终做的,但仍不能解释为什么芹菜文档建议'smart-attach-daemon' – Chozabu

+0

我没有在芹菜文档中找到它https://celery.readthedocs.io/ en/latest/search.html?q = smart-attach-daemon%E2%80%8C&check_keywords = yes&area = default – atn

+0

我的不好 - 我的意思是UWSGI文档,上面链接(http://uwsgi-docs.readthedocs.io/en /latest/AttachingDaemons.html) – Chozabu