Skip to content

ExecutionFailure

Outcome of a failed JobExecutor::attempt() call: retry, or give up.

final readonly class ExecutionFailure

SourceExecutionFailure.php
PropertyTypeDescription
$attemptsintreadonly.
$backoffSecondsintreadonly.
$exceptionThrowablereadonly.
$shouldRetryboolreadonly.
MethodDescription
exhausted(Throwable $exception, int $attempts): ExecutionFailureRetries exhausted; the caller has already recorded this to a FailedJobStoreInterface.
retry(Throwable $exception, int $attempts, int $backoffSeconds): ExecutionFailureA failure the caller should retry: carries the throwable, the attempt count so far, and how many seconds to wait before the next attempt.

public static function exhausted(Throwable $exception, int $attempts): ExecutionFailure

Retries exhausted; the caller has already recorded this to a FailedJobStoreInterface.

ParameterTypeDescription
$exceptionThrowable
$attemptsint

Returns ExecutionFailure

public static function retry(Throwable $exception, int $attempts, int $backoffSeconds): ExecutionFailure

A failure the caller should retry: carries the throwable, the attempt count so far, and how many seconds to wait before the next attempt.

ParameterTypeDescription
$exceptionThrowable
$attemptsint
$backoffSecondsint

Returns ExecutionFailure