Skip to content

Commit ea74b47

Browse files
authored
allow queueable notifications to set maxExceptions (#44773)
1 parent 0154825 commit ea74b47

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

SendQueuedNotifications.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ class SendQueuedNotifications implements ShouldQueue
5050
*/
5151
public $timeout;
5252

53+
/**
54+
* The maximum number of unhandled exceptions to allow before failing.
55+
*
56+
* @var int
57+
*/
58+
public $maxExceptions;
59+
5360
/**
5461
* Indicates if the job should be encrypted.
5562
*
@@ -72,6 +79,7 @@ public function __construct($notifiables, $notification, array $channels = null)
7279
$this->notifiables = $this->wrapNotifiables($notifiables);
7380
$this->tries = property_exists($notification, 'tries') ? $notification->tries : null;
7481
$this->timeout = property_exists($notification, 'timeout') ? $notification->timeout : null;
82+
$this->maxExceptions = property_exists($notification, 'maxExceptions') ? $notification->maxExceptions : null;
7583
$this->afterCommit = property_exists($notification, 'afterCommit') ? $notification->afterCommit : null;
7684
$this->shouldBeEncrypted = $notification instanceof ShouldBeEncrypted;
7785
}

0 commit comments

Comments
 (0)