Supervisord makes my Laravel queue:listen throw InvalidArgumentException(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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Supervisord 让我的 Laravel 队列:listen throw InvalidArgumentException


基础教程推荐
- Yii2 - 在运行时设置邮件传输参数 2022-01-01
- PHPUnit 的 Selenium 2 文档到底在哪里? 2022-01-01
- 主题化 Drupal 7 的 Ubercart “/cart"页 2021-01-01
- Web 服务器如何处理请求? 2021-01-01
- 将变量从树枝传递给 js 2022-01-01
- 如何在数学上评估像“2-1"这样的字符串?产生“1"? 2022-01-01
- php中的foreach复选框POST 2021-01-01
- php 7.4 在写入变量中的 Twig 问题 2022-01-01
- 使用 scandir() 在目录中查找文件夹 (PHP) 2022-01-01
- php中的PDF导出 2022-01-01