If i have multiple queues , is it possible to run all of them in sequence without needing to name each one on --queue
option?
You could use php artisan queue:work --queue=queue1,queue2,queue3
to run multiple ones, but it will be a single process and the priority on which queue's jobs are executed first is the order of how you list the queues in the command. (So in this example, first all queue1 jobs, then all queue2 jobs, etc.)
Running the following example will create numerous parallel processes which independently monitor queues without any queue prioritization:
php artisan queue:work --queue=queue1 & php artisan queue:work --queue=queue2 & php artisan queue:work --queue=queue3 &
I think listening for all possible queues is not supported, because the reason for defining seperate queues is seperate processing. (E.g. do Email Jobs on a different machine)
This solved my problem, I don't know whether it will help you or not.
php artisan queue:work --queue=low,high,
There are 3 queues in Laravel by default; "low, high," The third one is empty; it's not that hard or bad to just add these 3 queues in your queries.
If you've installed a process monitor like supervisor, you can simply add another background process for your default queues. Don't forget numprocs
, you can raise it more than high and low queue because default queues may be more important.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With