Skip to content

Commit 7afdaf1

Browse files
authored
Add ability to set backoff in broadcast events (#42737)
1 parent 52cea7f commit 7afdaf1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Illuminate/Broadcasting/BroadcastEvent.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ class BroadcastEvent implements ShouldQueue
3535
*/
3636
public $timeout;
3737

38+
/**
39+
* The number of seconds to wait before retrying a job that encountered an uncaught exception.
40+
*
41+
* @var int
42+
*/
43+
public $backoff;
44+
3845
/**
3946
* Create a new job handler instance.
4047
*
@@ -46,6 +53,7 @@ public function __construct($event)
4653
$this->event = $event;
4754
$this->tries = property_exists($event, 'tries') ? $event->tries : null;
4855
$this->timeout = property_exists($event, 'timeout') ? $event->timeout : null;
56+
$this->backoff = property_exists($event, 'backoff') ? $event->backoff : null;
4957
$this->afterCommit = property_exists($event, 'afterCommit') ? $event->afterCommit : null;
5058
}
5159

0 commit comments

Comments
 (0)