josegonzalez / cakephp-queuesadilla

CakePHP3: easily run background jobs on various message backends
https://cakephp-queuesadilla.readthedocs.org/en/latest/
MIT License
34 stars 14 forks source link

Gracefull restart #42

Open hw-rjuzak opened 2 years ago

hw-rjuzak commented 2 years ago

I have created a worker process with systemd. After every deployment the worker need to be restarted so the code changes can be reflected. Is there a possibility to send a kill signal to the worker that will let the current job finish and then stop the process so systemd can restart it?

bhelm commented 2 years ago

There are some signals that cause the worker to gracefully exit. For example, you can send a SIGQUIT to the worker with kill -3 . After the current job is completed, the worker will exit. source

This should indeed be mentioned in the Documentation.