taskiq icon indicating copy to clipboard operation
taskiq copied to clipboard

Scheduler SIGTERM Handler

Open lryan599 opened this issue 6 months ago • 1 comments

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?

lryan599 avatar May 08 '25 03:05 lryan599

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.

robertaistleitner avatar Jun 16 '25 10:06 robertaistleitner