Douglas Ferguson
Douglas Ferguson

Reputation: 1252

celery worker lost

Our deploy process restarts celery using a kill on all the celery proceses in the process list.

Sometimes I see "worker lost" in the celery logs. If a task is running when this happens, will the task be re-run or will it be lost? We are using redis.

Upvotes: 2

Views: 3785

Answers (1)

Rustem
Rustem

Reputation: 2932

Basically, you should send SIGTERM to each celery worker. http://docs.celeryproject.org/en/latest/userguide/workers.html#stopping-the-worker.

If you want to kill your processes and restart tasks you can set setting ACK_LATE, which will return task back to query if worker willn't successfully finish the task and halt. http://docs.celeryproject.org/en/latest/configuration.html?highlight=acks_late#celery-acks-late

Upvotes: 3

Related Questions