Active::Job and Shoryuken do action on SIGTERM

97 Views Asked by At

In my rails app, I have a Shoryuken runner as a runner on a Kubernetes Stack.

I have some long running job, and I want to do some action when the worker pod is stopped.

As far as I know, Kubernetes send a SIGTERM to the worker. I wish to catch this SIGTERM in my job to, for instance, retry the running job. But it seems that the signal cannot be catch in the job.

Any idea?

0

There are 0 best solutions below