Skip to content

Commit

Permalink
Handle exceptions better
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett Bailey authored and jdavidbakr committed Jun 9, 2023
1 parent a5530b3 commit e3a412a
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/RecordBounceJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ class RecordBounceJob implements ShouldQueue

public $message;

/**
* The maximum number of unhandled exceptions to allow before failing.
*
* @var int
*/
public $maxExceptions = 3;

public function __construct($message)
{
$this->message = $message;
Expand Down
7 changes: 7 additions & 0 deletions src/RecordComplaintJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ class RecordComplaintJob implements ShouldQueue

public $message;

/**
* The maximum number of unhandled exceptions to allow before failing.
*
* @var int
*/
public $maxExceptions = 3;

public function __construct($message)
{
$this->message = $message;
Expand Down
7 changes: 7 additions & 0 deletions src/RecordDeliveryJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ class RecordDeliveryJob implements ShouldQueue

public $message;

/**
* The maximum number of unhandled exceptions to allow before failing.
*
* @var int
*/
public $maxExceptions = 3;

public function __construct($message)
{
$this->message = $message;
Expand Down
7 changes: 7 additions & 0 deletions src/RecordLinkClickJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ class RecordLinkClickJob implements ShouldQueue
public $url;
public $ipAddress;

/**
* The maximum number of unhandled exceptions to allow before failing.
*
* @var int
*/
public $maxExceptions = 3;

public function retryUntil()
{
return now()->addDays(5);
Expand Down
7 changes: 7 additions & 0 deletions src/RecordTrackingJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ class RecordTrackingJob implements ShouldQueue
public $sentEmail;
public $ipAddress;

/**
* The maximum number of unhandled exceptions to allow before failing.
*
* @var int
*/
public $maxExceptions = 3;

public function __construct($sentEmail, $ipAddress)
{
$this->sentEmail = $sentEmail;
Expand Down

0 comments on commit e3a412a

Please sign in to comment.