-
Install Supervisor if not already:
sudo apt-get install supervisor
-
Create Worker File:
touch /etc/supervisor/conf.d/laravel-worker.conf
-
Fill the worker file with the following information:
[program:laravel-worker] process_name=%(program_name)s_%(process_num)02d command=php /PATH/TO/WEBAPP/artisan queue:work --sleep=3 --tries=3 --daemon autostart=true autorestart=true user=username numprocs=8 redirect_stderr=true stdout_logfile=/PATH/TO/WEBAPP/storage/logs/worker.log
-
Run the following commands to initialize and start worker:
sudo supervisorctl reread sudo supervisorctl update sudo supervisorctl start laravel-worker:*
Created
February 26, 2016 19:33
-
-
Save mgrimard/5087f24c01973acacf32 to your computer and use it in GitHub Desktop.
How to set up Laravel Queue Daemons
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
just what I need, thx 😄