laravel 5.4 + redis
If I use php artisan queue:listen
, it will listen the default queue.
If I specify the queue by php artisan queue:listen --queue a
then only the queue a will be listen.
Is there anyway to listen all queue in laravel 5.4 if there are many queues?
queue:listen will listen to the queue, and continue to process any queue commands it receives. This will continue running indefinitely until you stop it. In Laravel >=4.2 there was a --daemon command added.
Dispatcher is a Laravel artisan command scheduling tool used to schedule artisan commands within your project so you don't need to touch the crontab. This sounds brilliant for shared hosts and on-premise apps.
Laravel Artisan Queue Command: The queue:listen Command The queue:listen command is used to listen for and process jobs as they are added to the job queue. The command defines numerous parameters and options that can be used to customize how the queue listener interacts with and behaves under...
The queue:workCommand Laravel includes an Artisan command that will start a queue worker and process new jobs as they are pushed onto the queue. You may run the worker using the queue:workArtisan command. Note that once the queue:workcommand has started, it will continue to run until it is manually stopped or you close your terminal:
Laravel's events provide a simple observer pattern implementation, allowing you to subscribe and listen for various events that occur within your application. Event classes are typically stored in the app/Events directory, while their listeners are stored in app/Listeners.
By default, commands will be run using node interpreter. So, --interpreter will set it to php. Finally, 'queue:work --daemon' is the argument to the php artisan command. After running the above command from the laravel project root, run the following command to check the status.
I am afraid you cannot listen to all available queues without specifying which ones; you can, however, use the --queue
parameter for multiple queues, e.g.,:
php artisan queue:listen --queue a,b,c
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