I've setup supervisor to run multiple instances of the following command.
php artisan queue:work --queue=default--tries=3
My default Queue is currently database as a proof of concept, before migrating to SQS.
My laravel-work.ini file looks like the below.
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php ~/www/artisan queue:work --queue=default--tries=3 --daemon
autostart=true
autorestart=true
numprocs=5
stdout_logfile=~/www/storage/logs/workers.log
My supervisorctl
output is as follows.
laravel-worker:laravel-worker_00 RUNNING pid 34697, uptime 0:26:59
laravel-worker:laravel-worker_01 RUNNING pid 34698, uptime 0:26:59
laravel-worker:laravel-worker_02 RUNNING pid 34699, uptime 0:26:59
laravel-worker:laravel-worker_03 RUNNING pid 34700, uptime 0:26:59
laravel-worker:laravel-worker_04 RUNNING pid 34701, uptime 0:26:59
Not sure what I'm missing? But jobs in the database aren't getting processed.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire