RecordingQueueDriver
A decorating queue driver: wraps a real inner QueueDriverInterface and appends one EffectKind::Queue entry per RecordingQueueDriver::push() to an injected EffectLedger, then returns exactly as the real driver did.
Scoped to push() only: reserve()/ack()/release()/discard() on PollableQueueDriverInterface belong to an out-of-process worker polling the backlog later, not to the request that enqueued the job, and are not observed here.
push() returns void, and no driver hands back an id or other value a caller could observe from the call itself (see e.g. Quiote\Queue\Db\DbQueueDriver/Quiote\Queue\Redis\RedisQueueDriver, whose generated ids are internal to the backend) — so the effect’s result is null; there is nothing else genuine to record.
A real driver exception is never swallowed: no effect is recorded for a failed push, and the exception propagates exactly as it would through the undecorated driver, matching every other recorder in this package.
Synopsis
Section titled “Synopsis”final class RecordingQueueDriver implements QueueDriverInterface
| Implements | QueueDriverInterface |
| Source | Queue/RecordingQueueDriver.php |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(QueueDriverInterface $driver, EffectLedger $ledger, ClockInterface $clock = new SystemClock(…)): mixed
| Parameter | Type | Description |
|---|---|---|
$driver | QueueDriverInterface | |
$ledger | EffectLedger | |
$clock | ClockInterface |
Returns mixed
Methods
Section titled “Methods”| Method | Description |
|---|---|
describe(JobPayload $payload): array<string, mixed> | |
push(JobPayload $payload): void | Hands a job off to the driver’s backend. |
describe()
Section titled “describe()”public static function describe(JobPayload $payload): array<string, mixed>
| Parameter | Type | Description |
|---|---|---|
$payload | JobPayload |
Returns array``<``string``, ``mixed``>
push()
Section titled “push()”public function push(JobPayload $payload): void
Hands a job off to the driver’s backend.
Implementors either enqueue the payload for later execution or, for the in-process SyncQueueDriver, run it inline and block until it succeeds or exhausts its retries. A payload carrying a non-null JobPayload::$availableAt must not become visible to a worker before that moment.
| Parameter | Type | Description |
|---|---|---|
$payload | JobPayload |