How do I restart celery workers gracefully?

前端 未结 7 1731
别跟我提以往
别跟我提以往 2020-12-07 13:47

While issuing a new build to update code in workers how do I restart celery workers gracefully?

Edit: What I intend to do is to something like this

相关标签:
7条回答
  • 2020-12-07 14:52

    If you're going the kill route, pgrep to the rescue:

    kill -9 `pgrep -f celeryd`
    

    Mind you, this is not a long-running task and I don't care if it terminates brutally. Just reloading new code during dev. I'd go the restart service route if it was more sensitive.

    0 讨论(0)
提交回复
热议问题