【问题标题】:Laravel php artisan queue work and stop if jobs are emptyLaravel php artisan 队列工作并在作业为空时停止
【发布时间】:2020-11-06 06:58:07
【问题描述】:

如何在控制器中执行 php artisan queue:work --stop-when-empty 我试图在 php artisan 中调用它,如下所示

    $execute = artisan::call('php artisan queue:work --stop-when-empty');

但是什么都没发生,你能帮忙吗

【问题讨论】:

    标签: laravel-7.x laravel-artisan


    【解决方案1】:

    \Artisan::call('queue:work --stop-when-empty');

    【讨论】:

    • 能否在您的代码中添加注释?
    猜你喜欢
    • 1970-01-01
    • 2022-10-20
    • 2015-07-15
    • 1970-01-01
    • 2018-07-15
    • 2016-03-13
    • 2018-11-12
    • 2019-05-13
    • 1970-01-01
    相关资源
    最近更新 更多