Supervisord使我的Laravel队列:监听抛出InvalidArgumentException [英] Supervisord makes my Laravel queue:listen throw InvalidArgumentException

查看:172
本文介绍了Supervisord使我的Laravel队列:监听抛出InvalidArgumentException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到的问题与此处的帖子完全相同:

I'm having exactly the same issue as in the post here:

Laravel 4 Queue - [InvalidArgumentException] There are no commands defined in the "queue" namespace.

Centos 6.5 Final。 Laravel 4.2,Supervisor 3.0和Python 2.6.6

Centos 6.5 Final. Laravel 4.2, Supervisor 3.0 and Python 2.6.6

应用程序的配置:

[program:lvcartsey]
command=php artisan queue:listen --env="local"
stdout_logfile=/home/mike/web/app/storage/logs/myqueue_supervisord.log
redirect_stderr=true
directory=/home/mike/web
;autorestart=true
;autostart=true
user=mike

启动主管后,我会在myqueue_supervisord.log中得到它:

Once I start supervisor I get this in my myqueue_supervisord.log:

  [InvalidArgumentException]
  There are no commands defined in the "queue" namespace.

从命令行运行php artisan queue:listen可以正常工作。

When run from the command line php artisan queue:listen works as expected.

我搜索了google,但没有找到有关此问题的有用信息。有人知道这可能是什么原因吗?从命令行运行工匠与主管运行工匠有何不同?

I searched google, but I found no useful information regarding this issue. Anyone knows what might be the cause of this? How does running artisan from command line differ from supervisor running it?

推荐答案

请参见此答案

您想要做的就是更改

command=php artisan queue:listen --env="local"

command=/usr/local/bin/php artisan queue:listen --env="local"

这篇关于Supervisord使我的Laravel队列:监听抛出InvalidArgumentException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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