From d379b229dfcc87f81dafd75eeae0f5ecbd831fc3 Mon Sep 17 00:00:00 2001 From: Juan Pablo Balda Date: Thu, 9 Jun 2022 09:57:52 -0500 Subject: [PATCH] Add ability to set backoff in broadcast events --- src/Illuminate/Broadcasting/BroadcastEvent.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Illuminate/Broadcasting/BroadcastEvent.php b/src/Illuminate/Broadcasting/BroadcastEvent.php index 24a1c3367613..56d71aa8270e 100644 --- a/src/Illuminate/Broadcasting/BroadcastEvent.php +++ b/src/Illuminate/Broadcasting/BroadcastEvent.php @@ -35,6 +35,13 @@ class BroadcastEvent implements ShouldQueue */ public $timeout; + /** + * The number of seconds to wait before retrying a job that encountered an uncaught exception. + * + * @var int + */ + public $backoff; + /** * Create a new job handler instance. * @@ -46,6 +53,7 @@ public function __construct($event) $this->event = $event; $this->tries = property_exists($event, 'tries') ? $event->tries : null; $this->timeout = property_exists($event, 'timeout') ? $event->timeout : null; + $this->backoff = property_exists($event, 'backoff') ? $event->backoff : null; $this->afterCommit = property_exists($event, 'afterCommit') ? $event->afterCommit : null; }