请改用此代码:
// This job is sent to the default queue that you selected in config/app file
BulkPdfPrintLabel::withChain([
new MergeLabel($filepath, $manifest_id, $last, $user_id, $user_type)])
->dispatch($consignments, $last, $manifest_id, $user_id, $user_type, $filepath);
更新
// This job is sent to the "low" queue.("low" is custom and you can change it)
BulkPdfPrintLabel::withChain([
new MergeLabel($filepath, $manifest_id, $last, $user_id, $user_type)->onQueue("low")
])
->dispatch($consignments, $last, $manifest_id, $user_id, $user_type, $filepath);
然后运行此命令为您的默认队列设置高优先级:
php artisan queue:work --queue=high,default
参考laravel 队列