the configuration of the MAX_TASK_PER_CHILD variable can be set for you. This variable sets the number of tasks that the working pool performs before killing itself. If the course of the new work pool is completed, this will download the new code. On my system, I usually use restarting celery, leaving another task in the background, usually everything goes well, sometimes it happens that one of these tasks is never killed, and you can still kill it with a script.
Mauro rocco
source share