0
votes

I am using laravel 5 and queue driver beanstalkd already installed in application, could someone please suggest what i have to do for achieving parallel processing, i want to run jobs in parallel in a same or different queue. currently it oly process one job at a time which is very time-consuming.

2

2 Answers

0
votes

You can have multiple workers each watching a number of tubes. Which jobs will be run first depends on any priority when they were put into the system, or simple first-come-first.

It's a very common pattern to start and keep workers (one, or many) running with a tool such as 'SupervisorD'.

0
votes

Check the Laravel docs:

https://laravel.com/docs/5.5/queues#supervisor-configuration

Supervisor is that you need. Supervisor will control your workers, if they die, supervisor will restart them again. For parallel processing, check the attribute numprocs of Supervisor

From Laravel docs:

the numprocs directive will instruct Supervisor to run x queue:work processes and monitor all of them, automatically restarting them if they fail.