Supervisor para queues en Laravel 11
Alberto Benavides
1 min read
sudo apt-get update
sudo apt-get install supervisor
sudo nano /etc/supervisor/conf.d/laravel-worker.conf
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /your_project_directory/artisan queue:work --sleep=3 --tries=3
autostart=true
autorestart=true
user=root
numprocs=1
redirect_stderr=true
stdout_logfile=/your_project_directory/storage/logs/laravel.log
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start "laravel-worker:*"
Si se encuentra este error
“laravel-worker: ERROR (no such group).”
Agregar al archivo /etc/upervisord.conf
[include]
files = supervisor/conf.d/*.conf
0
Subscribe to my newsletter
Read articles from Alberto Benavides directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by