forked from laravel/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] New JobRetrying event dispatched (laravel#39097)
* New JobRetrying event dispatched * Style fixes * formatitng Co-authored-by: Taylor Otwell <taylorotwell@gmail.com>
- Loading branch information
1 parent
6126db2
commit ffa8f90
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
namespace Illuminate\Queue\Events; | ||
|
||
class JobRetryRequested | ||
{ | ||
/** | ||
* The job instance. | ||
* | ||
* @var \stdClass | ||
*/ | ||
public $job; | ||
|
||
/** | ||
* The decoded job payload. | ||
* | ||
* @var array|null | ||
*/ | ||
protected $payload = null; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param \stdClass $job | ||
* @return void | ||
*/ | ||
public function __construct($job) | ||
{ | ||
$this->job = $job; | ||
} | ||
|
||
/** | ||
* The job payload. | ||
* | ||
* @return array | ||
*/ | ||
public function payload() | ||
{ | ||
if (is_null($this->payload)) { | ||
$this->payload = json_decode($this->job->payload, true); | ||
} | ||
|
||
return $this->payload; | ||
} | ||
} |