Commaaa2
This commit is contained in:
@@ -2,11 +2,15 @@
|
||||
|
||||
namespace Illuminate\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Mail\Factory as MailFactory;
|
||||
use Illuminate\Contracts\Mail\Mailable as MailableContract;
|
||||
use Illuminate\Contracts\Queue\ShouldBeEncrypted;
|
||||
|
||||
class SendQueuedMailable
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
/**
|
||||
* The mailable message instance.
|
||||
*
|
||||
@@ -28,6 +32,13 @@ class SendQueuedMailable
|
||||
*/
|
||||
public $timeout;
|
||||
|
||||
/**
|
||||
* Indicates if the job should be encrypted.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $shouldBeEncrypted = false;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
@@ -39,6 +50,8 @@ class SendQueuedMailable
|
||||
$this->mailable = $mailable;
|
||||
$this->tries = property_exists($mailable, 'tries') ? $mailable->tries : null;
|
||||
$this->timeout = property_exists($mailable, 'timeout') ? $mailable->timeout : null;
|
||||
$this->afterCommit = property_exists($mailable, 'afterCommit') ? $mailable->afterCommit : null;
|
||||
$this->shouldBeEncrypted = $mailable instanceof ShouldBeEncrypted;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -76,17 +89,17 @@ class SendQueuedMailable
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the retry delay for the mailable object.
|
||||
* Get the number of seconds before a released mailable will be available.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function retryAfter()
|
||||
public function backoff()
|
||||
{
|
||||
if (! method_exists($this->mailable, 'retryAfter') && ! isset($this->mailable->retryAfter)) {
|
||||
if (! method_exists($this->mailable, 'backoff') && ! isset($this->mailable->backoff)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return $this->mailable->retryAfter ?? $this->mailable->retryAfter();
|
||||
return $this->mailable->backoff ?? $this->mailable->backoff();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user