Documentation

No matching pages.

API

Config

Facade

Lifecycle

Class: Job

Full name: Azera\Queue\Job

Base implementation of JobInterface with sensible defaults.

Extend this class to create a job without boilerplate:

class SendWelcomeEmailJob extends Job
{
    public function __construct(private string $email) }

    public function handle(): void
    {
        Mailer::send($this->email, 'Welcome!');
    }
}

Public methods

tries() ·

public function tries(): int

Return value

  • Type: int

backoff() ·

public function backoff(): array|int

Return value

  • Type: array|int

retryUntil() ·

public function retryUntil(): int|null

Return value

  • Type: int|null

failed() ·

public function failed(Throwable $exception): void

Parameters

Name Type Default Description
$exception Throwable -

Return value

  • Type: void

id() ·

public function id(): string|null

Return value

  • Type: string|null

queue() ·

public function queue(): string

Return value

  • Type: string

Back to the Index