job ? $this->job->attempts() : 1; } /** * Delete the job from the queue. * * @return void */ public function delete() { if ($this->job) { return $this->job->delete(); } } /** * Fail the job from the queue. * * @param \Throwable $exception * @return void */ public function fail($exception = null) { if ($this->job) { FailingJob::handle($this->job->getConnectionName(), $this->job, $exception); } } /** * Release the job back into the queue. * * @param int $delay * @return void */ public function release($delay = 0) { if ($this->job) { return $this->job->release($delay); } } /** * Set the base queue job instance. * * @param \Illuminate\Contracts\Queue\Job $job * @return $this */ public function setJob(JobContract $job) { $this->job = $job; return $this; } }