Skip to content

Instantly share code, notes, and snippets.

@felixivance
Created November 11, 2020 11:17
Show Gist options
  • Save felixivance/8ccd6d820e1f448cb58e95f9f4478720 to your computer and use it in GitHub Desktop.
Save felixivance/8ccd6d820e1f448cb58e95f9f4478720 to your computer and use it in GitHub Desktop.
Laravel-queue-worker Medium Article
sudo apt-get install supervisor
cd /etc/supervisor/conf.d
#edit file
sudo nano /etc/supervisor/conf.d/queue-worker.conf
#command
[program:queue-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/artisan queue:work
autostart=true
autorestart=true
user=root
numprocs=8
redirect_stderr=true
stdout_logfile=/var/www/html/worker.log
#supervisor commands
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl reload
sudo service supervisor restart
@junicodes
Copy link

Thanks for this, I just tried it about to test it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment