Documentation

No matching pages.

API

Config

Facade

Lifecycle

Class: SyncQueue

Full name: Azera\Queue\SyncQueue

A queue that processes jobs synchronously, immediately in the current process.

This is the default fallback when no async queue backend is registered. It allows application code to be written against QueueInterface from day one — switching to Redis/AMQP later is a one-line bootstrap change with no code rewrite.

SyncQueue is also the correct choice in tests and in single-request PHP-FPM deployments where no background worker is available.

Public methods

push() ·

public function push(Azera\Queue\JobInterface $job, array $options = []): mixed

Parameters

Name Type Default Description
$job JobInterface -
$options array []

Return value

  • Type: mixed

registerWorker() ·

public function registerWorker(string $jobClass, callable|null $handler = null): void

Parameters

Name Type Default Description
$jobClass string -
$handler callable|null null

Return value

  • Type: void

Back to the Index