ExecutionFailure
Outcome of a failed JobExecutor::attempt() call: retry, or give up.
Synopsis
Section titled “Synopsis”final readonly class ExecutionFailure
| Source | ExecutionFailure.php |
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
$attempts | int | readonly. |
$backoffSeconds | int | readonly. |
$exception | Throwable | readonly. |
$shouldRetry | bool | readonly. |
Methods
Section titled “Methods”| Method | Description |
|---|---|
exhausted(Throwable $exception, int $attempts): ExecutionFailure | Retries exhausted; the caller has already recorded this to a FailedJobStoreInterface. |
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. |
exhausted()
Section titled “exhausted()”public static function exhausted(Throwable $exception, int $attempts): ExecutionFailure
Retries exhausted; the caller has already recorded this to a FailedJobStoreInterface.
| Parameter | Type | Description |
|---|---|---|
$exception | Throwable | |
$attempts | int |
Returns ExecutionFailure
retry()
Section titled “retry()”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.
| Parameter | Type | Description |
|---|---|---|
$exception | Throwable | |
$attempts | int | |
$backoffSeconds | int |
Returns ExecutionFailure