How to restart Celery gracefully without delaying tasks

前端 未结 7 565
面向向阳花
面向向阳花 2020-12-24 07:14

We use Celery with our Django webapp to manage offline tasks; some of these tasks can run up to 120 seconds.

Whenever we make any code modifications, we need to rest

7条回答
  •  时光取名叫无心
    2020-12-24 07:47

    Well you using SIGHUP (1) for warm shutdown of celery. I am not sure if it actually causes a warm shutdown. But SIGINT (2) would cause a warm shutdown. Try SIGINT in place of SIGHUP and then start celery manually in your script (I guess).

提交回复
热议问题