mercredi 19 août 2020

Laravel Queues AWS Elastic Beanstalk

Im having a problem with getting queues to work on my prod environment. I am using Elastic Beanstalk to deploy my Laravel Application. To start the queue workers i am using supervisor with the following config:

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/artisan queue:work database --sleep=3 --tries=2 --daemon
autostart=true
autorestart=true
numprocs=1
redirect_stderr=true
stdout_logfile=/var/www/html/storage/logs/laravel.log
stopwaitsecs=3600

In my prebuild commands im then running:

sudo supervisorctl reread

sudo supervisorctl update

sudo supervisorctl start laravel-worker:*

Nothing fails and the supervisor daemon runs:

sudo supervisorctl status
laravel-worker:laravel-worker_00   RUNNING   pid 8189, uptime 0:22:47

The problem is that if i add anything onto the queue it doesnt pick it up and process it (works fine on my local)!

Even if i log into the EC2 instance and run php artisan queue:work database it will not recognise the Jobs being sent.

Thanks for any help!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire