Laravel作业已推送至Amazon SQS,但未处理 [英] Laravel jobs pushed to Amazon SQS but not processing

查看:70
本文介绍了Laravel作业已推送至Amazon SQS,但未处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Laravel 5.3.我正在尝试测试队列作业,并且将队列配置为使用Amazon SQS.我的应用程序能够将作业推送到队列中,并且可以在SQS中看到该作业.但是它停留在那里,从未被处理过.我试过运行php artisan queue:workqueue:listenqueue:work sqs ...,它们都没有使工作脱离队列.我正在使用Homestead在本地进行测试.从SQS处理作业有技巧吗?

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?

推荐答案

我遇到了同样的问题.我正在使用主管.这对我有用:

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

在命令( sqs )中提到的队列驱动程序:

Mentioned queue driver in command (sqs):

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

然后运行以下命令:

sudo supervisorctl reread

sudo supervisorctl update

sudo supervisorctl restart all

发布此信息以防万一.

Posting this just in case it helps anyone.

这篇关于Laravel作业已推送至Amazon SQS,但未处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆