【问题标题】:In laravel job using database as queue connection. But queue:work command not triggering queues?在使用数据库作为队列连接的 laravel 作业中。但是 queue:work 命令不触发队列?
【发布时间】:2020-10-13 10:44:45
【问题描述】:

在 Laravel 作业中,队列连接为 QUEUE_CONNECTION=database。当使用QUEUE_CONNECTION=sync php artisan queue:work 正在运行但使用QUEUE_CONNECTION=database 时队列没有触发。 php artisan queue:listen 也不会触发作业。

【问题讨论】:

  • 确保清除缓存。使用php artisan config:cachephp artisan queue:work
  • 您在日志文件中看到任何错误吗?
  • 感谢您的回复。日志文件没有错误。
  • 运行php artisan queue:restart。告诉我这是否有效。
  • 我也清除了缓存。同样的错误来了。

标签: php laravel


【解决方案1】:

你需要跑

php artisan queue:restart 

在一个选项卡和另一个正在运行的选项卡中

php artisan queue:work

【讨论】:

    【解决方案2】:

    请跑

    php artisan queue:work --queue orders
    

    【讨论】:

      猜你喜欢
      • 2016-12-30
      • 2019-02-28
      • 1970-01-01
      • 2019-12-29
      • 1970-01-01
      • 1970-01-01
      • 2018-03-24
      • 2018-03-15
      • 2018-11-20
      相关资源
      最近更新 更多