Supervisord makes my Laravel queue:listen throw InvalidArgumentException

烂漫一生 提交于 2020-01-01 18:19:34

问题


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 and Python 2.6.6

The config for the app:

[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

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

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

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

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?


回答1:


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

What you want to do is to change

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

to

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


来源:https://stackoverflow.com/questions/25018202/supervisord-makes-my-laravel-queuelisten-throw-invalidargumentexception

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