Laravel jobs pushed to Amazon SQS but not processing

你说的曾经没有我的故事 提交于 2020-01-02 05:25:06

问题


I'm running Laravel 5.3. I'm attempting to test a queue job, and I have my queue configured to use Amazon SQS. My app is able to push a job onto the queue, and I can see the job in SQS. But it stays there, never being processed. I've tried running php artisan queue:work, queue:listen, queue:work sqs... None of them are popping the job off the queue. I'm testing this locally with Homestead. Is there a trick to processing jobs from SQS?


回答1:


I faced the same problem. I was using supervisor. This worked for me:

Mentioned queue driver in command (sqs):

command=php /var/www/html/artisan queue:work sqs --tries=3

Then ran these commands:

sudo supervisorctl reread

sudo supervisorctl update

sudo supervisorctl restart all

Posting this just in case it helps anyone.



来源:https://stackoverflow.com/questions/39519581/laravel-jobs-pushed-to-amazon-sqs-but-not-processing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!