Você pode seguramente reiniciar o celery worker sem perder nenhuma tarefa com o sinal TERM. Assim, o aipo terminará as tarefas atuais e morrerá.
Se você quiser que suas tarefas sejam repetidas se algo der errado, você também poderá usar a opção acks_late (Task.acks_late / CELERY_ACKS_LATE).
P: Como posso desligar o trabalhador com segurança? (de: link )
Answer: Use the TERM signal, and the worker will finish all currently executing jobs and shut down as soon as possible. No tasks should be lost.
You should never stop worker with the KILL signal (-9), unless you’ve tried TERM a few times and waited a few minutes to let it get a chance to shut down. As if you do tasks may be terminated mid-execution, and they will not be re-run unless you have the acks_late option set (Task.acks_late / CELERY_ACKS_LATE).
Para parar o trabalhador (de: link )
P: Parando o trabalhador
Shutdown should be accomplished using the TERM signal.
Para enviar um sinal TERM, use o comando linux KILL (de: link )
kill - terminate a process SYNOPSIS
kill [ -s signal | -p ] [ -a ] [ -- ] pid ... kill -l [ signal ] DESCRIPTION
The command kill sends the specified signal to the specified process or process group. If no signal is specified, the TERM signal is sent. The TERM signal will kill processes which do not catch this signal. For other processes, it may be necessary to use the KILL (9) signal, since this signal cannot be caught.