我使用Laravel Horizon,并将通知按如下方式放置:
# Notifies the user that the transfer was made
$transfer->user->notify((new ConfirmedTransfer($transfer))->queue('default'));
问题在于,当发生错误时,Horizon不会自动重试。 该怎么做?
答案 0 :(得分:1)
使用工作:
在此处了解更多信息:https://laravel.com/docs/5.8/queues#generating-job-classes
class TransferJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $tries = 5;
}