Laravel Lumen Queue Failure with queue:work but not queue:listen

六月ゝ 毕业季﹏ 提交于 2020-01-06 07:13:10

问题


I have an issue where I have a command that inserts jobs into a DB queue. I have a service "supervisor" basically running artisan queue:work continuesily (I should also mention I have a once per min cron job running artisan schedule:run). If I just run this command and let the supervisor pick up when the queued job should run I get this exception:

Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method App\Services\MiddlewareApi::get_lowest_active_customer_number_by_email() in /var/www/vhosts/my-domain.com/httpdocs/my-app/app/Jobs/UpdateBadCustomerNumbersJob.php:48

(I have checked and that class does indeed have that method)

but when I run php artisan queue:listen right after I run the command that calls the UpdateBadCustomerNumberJob.php things seem to function correctly. Should I make some sort of adjustment to my supervisor? If so why?


回答1:


So it turns out that this issue was called because the queue wasn't picking up the new code changes I had deployed. This issue was solved by running queue:restart and rebooting the Supervisor.



来源:https://stackoverflow.com/questions/46565791/laravel-lumen-queue-failure-with-queuework-but-not-queuelisten

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