Laravel 失败时自动重试通知
Laravel auto-retry Notification on fail
我使用 Laravel Horizon 并将通知按如下方式排列:
# Notifies the user that the transfer was made
$transfer->user->notify((new ConfirmedTransfer($transfer))->queue('default'));
问题是发生错误时,Horizon 不会自动重试。
如何做到这一点?
使用职位:
在此处阅读更多内容:https://laravel.com/docs/5.8/queues#generating-job-classes
class TransferJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $tries = 5;
}
我使用 Laravel Horizon 并将通知按如下方式排列:
# Notifies the user that the transfer was made
$transfer->user->notify((new ConfirmedTransfer($transfer))->queue('default'));
问题是发生错误时,Horizon 不会自动重试。 如何做到这一点?
使用职位:
在此处阅读更多内容:https://laravel.com/docs/5.8/queues#generating-job-classes
class TransferJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $tries = 5;
}