Give up sending a worker-offline message if transport is not connected#6039
Merged
auvipy merged 2 commits intoApr 15, 2020
Merged
Conversation
auvipy
approved these changes
Apr 15, 2020
auvipy
approved these changes
Apr 15, 2020
Description
If a celery worker is segmented from a cluster and is told to die, it will try very aggressively to connect to the transport that may or not exist at this point. This can add a bit of time to shutdown procedures and usually ends up just getting sigkill'd by the init/supervisor regardless.
This change makes it so that the
worker-offlineis still sent, but if it is lost, just accept it and die peacefully by settingretry=Falseon theworker-offlinemessage.In cases where a cluster is still fully operational from the segmented worker, it will track the worker as lost by heartbeats instead of the offline message.