我对 php artisan queue::work 命令感到不安。
我的命令不起作用,但我的作业已插入作业表但从未执行。
我正在为队列使用 mongodb 驱动程序。
我做错了什么,请给我建议。
最佳答案
在花了半天时间搜索后,我注意到队列不在维护模式下运行。你必须把 --force
放在它的末尾。
--force Force the worker to run even in maintenance mode
因此运行 php artisan queue:work --force
以便在维护模式下运行队列。
参见 https://laravel.com/docs/8.x/configuration#maintenance-mode了解详情。
关于mongodb - Php工匠队列:work not working but job are inserted,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41632559/