Skip to content

Commit

Permalink
[5.4] Added ability to granularly set mailable tries & timeout (#18103)
Browse files Browse the repository at this point in the history
* Added ability to granularly set the mailable tries and timeout properties

*        add properties to the SendQueuedMailable Job
  • Loading branch information
themsaid authored and taylorotwell committed Feb 25, 2017
1 parent 8be9acf commit 2d5514c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Illuminate/Mail/SendQueuedMailable.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ class SendQueuedMailable
*/
public $mailable;

/**
* The number of times the job may be attempted.
*
* @var int
*/
public $tries;

/**
* The number of seconds the job can run before timing out.
*
* @var int
*/
public $timeout;

/**
* Create a new job instance.
*
Expand All @@ -23,6 +37,8 @@ class SendQueuedMailable
public function __construct(MailableContract $mailable)
{
$this->mailable = $mailable;
$this->tries = property_exists($mailable, 'tries') ? $mailable->tries : null;
$this->timeout = property_exists($mailable, 'timeout') ? $mailable->timeout : null;
}

/**
Expand Down

0 comments on commit 2d5514c

Please sign in to comment.