schmittjoh / JMSJobQueueBundle

Run and Schedule Symfony Console Commands as Background Jobs
http://jmsyst.com/bundles/JMSJobQueueBundle
334 stars 254 forks source link

Do not break when there are still running jobs. #236

Open CZYK opened 4 years ago

CZYK commented 4 years ago

Currently the RunCommand::runJobs terminates when it receives a SIGTERM or the $maxRuntime is expired. When this happens the running jobs are also terminated and remain as running.

This change makes sure that runJobs waits until all running jobs are finished and doesn't start any new jobs when it is instructed to shutdown.