mjphaynes / php-resque

php-resque is a Redis-backed PHP library for creating background jobs, placing them on multiple queues, and processing them later.
MIT License
222 stars 50 forks source link

worker shutdown handling #77

Open scones opened 6 years ago

scones commented 6 years ago

updated for wrong assumption

feature

please make the signal handling configurable per signal. i'd like the handling of shutdown on SIGINT and SIGTERM, instead of a hard exit to make sure no data is lost. Since i plan to scale my workers through docker scaling, the workers within the containers will receive a SIGTERM on downscaling, on which i'd like to wait for the job to finish before closing the worker.

merlindorin commented 6 years ago

Seems a lot of work, if you want to make a PR, I will appreciate to make a review :D ;)