Supervisord 让我的 Laravel 队列:listen throw InvalidArgumentException [英] Supervisord makes my Laravel queue:listen throw InvalidArgumentException

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

问题描述

我遇到的问题与这里的帖子完全相同:

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

Laravel 4 队列 - [InvalidArgumentException]队列"中没有定义命令.命名空间.

Centos 6.5 最终版.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.

我搜索了谷歌,但没有找到有关此问题的有用信息.任何人都知道这可能是什么原因?从命令行运行 artisan 与运行它的主管有何不同?

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?

推荐答案

参见这个答案.它可能也适合你.

See this answer. It's probably a fix for you too.

你想做的就是改变

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

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

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

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