Skip to content

Instantly share code, notes, and snippets.

@junicodes
Forked from felixivance/queue-worker.conf
Created March 13, 2021 00:49
Show Gist options
  • Save junicodes/710422f575bb81e9561e05cdca316594 to your computer and use it in GitHub Desktop.
Save junicodes/710422f575bb81e9561e05cdca316594 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment