I am creating Laravel Jobs for sending emails and add them in Laravel Queue. Everything works fine, but the timeout of laravel queue is 300 seconds. How can I extend this time? Or I want to run this queue listen forever because anytime mails can be send due to user interaction. Any one can help?
2 Answers
To run a queue listener in the background, you need to configure it via Supervisor which is a process monitor for Linux. You can even assign the number of workers using this.
To configure the timeout, you can use the option timeout in the queue:listen command. The command will be:
php artisan queue:listen --timeout=500
2 Comments
sathish R
Thanks. But is there any option to run queue infinitely without supervisor.
Himanshu Sharma
If you are talking about local development, you can run your listener in one terminal tab or use shell. Or you can use 'sync' as a queue driver which does not require a listener to run but will execute your jobs synchronously.