schmittjoh / JMSJobQueueBundle

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

Multiple job servers #136

Closed NicParry closed 8 years ago

NicParry commented 8 years ago

Is this bundle capable of handling concurrency for multiple job servers? I have a need to scale out with redundancy, but am not sure how well concurrency will be handled, in terms of DB level locks on jobs being picked up.

NicParry commented 8 years ago

After browsing some of the closed issues, I see that this is handled, can someone point me in the direction of the code/config that handles the implicit row locking?

NicParry commented 8 years ago

I've answered my own question https://github.com/schmittjoh/JMSJobQueueBundle/blob/master/Entity/Repository/JobRepository.php#L141

This update query ensures locking with 'workerName IS NULL'