Illuminate\Queue\Worker::markJobAsFailedIfAlreadyExceedsMaxAttempts PHP 메소드

markJobAsFailedIfAlreadyExceedsMaxAttempts() 보호된 메소드

This will likely be because the job previously exceeded a timeout.
protected markJobAsFailedIfAlreadyExceedsMaxAttempts ( string $connectionName, Illuminate\Contracts\Queue\Job $job, integer $maxTries ) : void
$connectionName string
$job Illuminate\Contracts\Queue\Job
$maxTries integer
리턴 void
    protected function markJobAsFailedIfAlreadyExceedsMaxAttempts($connectionName, $job, $maxTries)
    {
        $maxTries = !is_null($job->maxTries()) ? $job->maxTries() : $maxTries;
        if ($maxTries === 0 || $job->attempts() <= $maxTries) {
            return;
        }
        $e = new MaxAttemptsExceededException('A queued job has been attempted too many times. The job may have previously timed out.');
        $this->failJob($connectionName, $job, $e);
        throw $e;
    }