django - 我应该使用 attach-daemon 还是 smart-attach daemon 用 UWSGI 自动启动 celery(并轻松更新任务)

标签 django server celery uwsgi

首先 - 我知道 UWSGI 建议使用 smart-attach-daemon
来自: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 似乎可以实现自动化改为启动它?

我是否在这里遗漏了什么,是否有比杀死 celery 实例或使用 attach-daemon 更好的解决方案? ?

最佳答案

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

从 uwsgi 2.0 开始,还有 'attach-daemon2'其中有 touch选项。

关于django - 我应该使用 attach-daemon 还是 smart-attach daemon 用 UWSGI 自动启动 celery(并轻松更新任务),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37727068/

相关文章:

django - Docker 容器拒绝连接

docker - docker 现在还不能在 Strato 托管的虚拟服务器上运行吗?

mysql - 在 Node 中从文件与数据库中提供内容

python - 如何将 Celery worker 连接到 Django 测试数据库

python - 使用 Celery Canvas,chord() 和 chain(group(), task) 有什么区别

python - Django 应用程序中的外部身份验证

python - Django 信号与 channel

python - 如何使用 Python 检查 Celery/Supervisor 是否正在运行

django - 提示 : Perhaps you meant to reference the column

server - bokeh 服务器,使用 key 生成 session ID