Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 777 Bytes

README.md

File metadata and controls

33 lines (22 loc) · 777 Bytes

marko/queue-database

Database queue driver — stores and processes jobs in SQL tables with transaction-safe polling and failed job persistence.

Installation

composer require marko/queue-database

Then run marko db:migrate to create the jobs and failed_jobs tables from the entities the package ships.

Quick Example

use Marko\Queue\QueueInterface;

public function __construct(
    private readonly QueueInterface $queue,
) {}

public function enqueue(): void
{
    $this->queue->push(new ProcessOrder($orderId));

    // Delay by 5 minutes
    $this->queue->later(300, new SendFollowUp($orderId));
}

Documentation

Full usage, API reference, and examples: marko/queue-database