运行Celery的新启动作业并不会停止所有工作进程

2024-09-30 14:16:56 发布

您现在位置:Python中文网/ 问答频道 /正文

我写了一个新贵的工作来运行我的Ubuntu服务器芹菜。这是我的配置文件celeryd.conf

# celeryd - runs the celery daemon
#
# This task is run on startup to run the celery daemon

description "run celery daemon"

start on startup
expect fork
respawn

exec su - trakklr -c "/app/trakklr/src/trakklr celeryd --events --beat --loglevel=debug --settings=production"

当我执行sudo service celeryd start时,celeryd进程启动得很好,所有x个工作进程的启动都很好。在

…但是当我执行sudo service celeryd stop时,它会停止大多数进程,但有一些进程会挂起。在

为什么会这样?我用的是芹菜2.5.3。在


这是Github跟踪器的一个问题。在

https://github.com/celery/django-celery/issues/142


Tags: therun服务器进程onubuntuservicesudo
2条回答

我不知道这一点,但这似乎是一个问题,我的老版本芹菜。我在他们的问题追踪者上发现了这个问题,我想它指向了同一个问题:

https://github.com/celery/django-celery/issues/142

我把我的芹菜和django芹菜升级到3.x.x版本,这个问题就没有了。在

我仍然使用init.d来运行芹菜,所以这可能不适用。考虑到这一点,停止芹菜服务会向芹菜发送术语信号。这会告诉工作人员不要接受新任务,但不会终止现有任务。因此,根据任务执行的时间长短,您可能会在通知celeri停止后看到一段时间的任务。最终,它们都会关闭,除非你有其他问题。在

相关问题 更多 >

    热门问题