schmittjoh / JMSJobQueueBundle

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

Can't figure out how to have queue slots always available for high priority jobs, possible? #179

Closed modstore closed 6 years ago

modstore commented 6 years ago
jms_job_queue:
    queue_options_defaults:
        max_concurrent_jobs: 8

    queue_options:
        default:
            max_concurrent_jobs: 4
        high_priority:
            max_concurrent_jobs: 4

I am wanting to have 4 slots always being used for standard processing and have 4 extra slots always available to start processing high priority items when they become available.

What happens though, is when high priority jobs are added to "high_priority" queue, 4 of those jobs start processing and the "default" queue jobs stop until the others finish.

Is it possible to have the setup I'm looking for?

Thanks heaps for the great bundle. :)

schmittjoh commented 6 years ago

Make sure to set max-concurrent-jobs option when starting the RunCommand.