I an using laravel 5.1 and Redis database for the queue. I want to supervise the queue:listen command Application is hosted in AWS.
For the installation I have used following command
sudo su - //it would be root user
easy_install supervisor
echo_supervisord_conf
echo_supervisord_conf > /etc/supervisord.conf
cd /etc
sudo vim supervisord.conf
Add the following line at the bottom
[program:queue]
command=/usr/bin/php /var/www/html/artisan --env="production" --timeout 240 queue:listen
and then
supervisord -c /etc/supervisord.conf
supervisorctl status
sudo su - //it would be root user
easy_install supervisor
echo_supervisord_conf
echo_supervisord_conf > /etc/supervisord.conf
sudo vim /etc/supervisord.conf
Add the following code at the end of the file supervisord.conf
[program:queue]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/artisan queue:work sqs --sleep=3 --tries=3 --daemon
autostart=true
autorestart=true
user=forge
numprocs=2
redirect_stderr=true
stdout_logfile=/var/www/html/storage/logs/supervisord.log
Run following command to start
supervisord -c /etc/supervisord.conf //To start
supervisorctl status
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.