Supervisord config for managing laravel queues

Submitted by larageek - 9 years ago

Once jobs have been added on the queue, we need to process them one by one. php artisan queue:listen does - It listens for jobs and runs them as they become available. But the main problem is how do we make php listen at all times ? We need to avoid having to "supervise" this process manually. This is where supervisord comes in. This is the configuration file to be placed in the /etc/supervisor/conf.d/ directory, which will create a supervisor program called "queue" which will monitor and make sure the php artisan queue:listen --tries=3 is always running.

command=php artisan queue:listen --tries=3 --env=your_environment