laravel 队列执行优先级
队列优先级
dispatch((new Job)->onQueue('high'));
启动一个 worker, 此方法可以安装优先级 正确执行
php artisan queue:work --queue=high,low
但是 使用 horizon
来进行守护php artisan horizon
来运行, 队列不执行php artisan horizon --queue=high,low
, 提示 The “–queue” option does not exist.
修改horizon
配置文件 将 balance
修改为 false , queue 将上配置 , 可以执行, 但是不是完全 按照优先级 去执行。
请问下, 有人遇到吗? 如何解决的?
config/horizon.php
的queue
修改为试试。