Skip to content

Commit

Permalink
Added attempts() method to FakeJob
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesFreeman committed Jun 28, 2024
1 parent b8fa132 commit 440a139
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Illuminate/Queue/Jobs/FakeJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ class FakeJob extends Job
*/
public $failedWith;

/**
* The number of attempts made to process the job.
*
* @var int
*/
public $attempts = 1;

/**
* Get the job identifier.
*
Expand Down Expand Up @@ -52,6 +59,16 @@ public function release($delay = 0)
$this->releaseDelay = $delay;
}

/**
* Get the number of times the job has been attempted.
*
* @return int
*/
public function attempts()
{
return $this->attempts;
}

/**
* Delete the job from the queue.
*
Expand Down

0 comments on commit 440a139

Please sign in to comment.