taskiq
taskiq copied to clipboard
Scheduler SIGTERM Handler
I noticed that the scheduler does not have a handler set for sigterm, which leads to the scheduler as a pid 1 process not properly handling the sigterm signals sent by the kube to exit correctly when I deploy the scheduler in a container alone.
Actually, sigint can be captured, but sigterm can not, and should probably be set explicitly.
Is it possible to set the signal handler for taskiq scheduler just like worker?
I just found the same issue because docker wasn't able to properly stop the container using the default SIGINT signal. It just waits for the timeout and hard kills it after the configured timeout.