如果低优先级作业需要很长时间才能完成,artisan 队列中的低优先级作业是否会停止执行高优先级任务?

Will low priority job in artisan queue stop high priority tas from being executed if low priority job takes long time to complete?

我正在 运行宁 artisan 使用 pm2 的队列工作人员并且正在考虑 运行 两个 artisan 工作人员,一个可以处理高优先级队列,另一个将处理低优先级、长作业。

问题是 pm2 不允许 运行 相同的脚本作为单独的实例。

我知道我可以在这里设置优先级--queue=live-high,live-low,default,但我的问题是如果低优先级的工作需要 5 分钟才能完成,我需要能够同时处理高优先级的工作

来自 Laravel 文档:

Background Tasks

By default, multiple commands scheduled at the same time will execute sequentially. If you have long-running commands, this may cause subsequent commands to start much later than anticipated. If you would like to run commands in the background so that they may all run simultaneously, you may use the runInBackground method:

$schedule->command('analytics:report')
         ->daily()
         ->runInBackground();

https://laravel.com/docs/5.7/scheduling#background-tasks