【问题标题】:Laravel auto-retry Notification on failLaravel 自动重试失败通知
【发布时间】:2019-06-14 15:06:21
【问题描述】:

我使用 Laravel Horizo​​n 并将通知按如下方式排列:

# Notifies the user that the transfer was made
$transfer->user->notify((new ConfirmedTransfer($transfer))->queue('default'));

问题是发生错误时,Horizo​​n 不会自动重试。 如何做到这一点?

【问题讨论】:

    标签: php laravel laravel-5 eloquent laravel-horizon


    【解决方案1】:

    使用工作:

    在这里阅读更多:https://laravel.com/docs/5.8/queues#generating-job-classes

    class TransferJob implements ShouldQueue
    {
        use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
        public $tries = 5;
    
    }
    

    【讨论】:

      猜你喜欢
      • 2021-02-27
      • 2022-08-11
      • 2017-02-25
      • 2019-04-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-04
      相关资源
      最近更新 更多