Skip to content

RetryableJob

Opt-in per-job retry policy.

A Job that does not implement this gets the config-level defaults instead (queue.retry.max_attempts, queue.retry.backoff_seconds) — see JobExecutor.

interface RetryableJob extends Job

ImplementsJob
SourceRetryableJob.php
MethodDescription
backoffSeconds(int $attempt): intDelay before the given (1-based) retry attempt.
maxAttempts(): intTotal attempts allowed, including the first.

abstract public function backoffSeconds(int $attempt): int

Delay before the given (1-based) retry attempt.

ParameterTypeDescription
$attemptint

Returns int

abstract public function maxAttempts(): int

Total attempts allowed, including the first.

Returns int

These come from an ancestor and are documented where they are declared.

MethodDeclared inDescription
handle()JobPerforms the job’s work.