Skip to content

DatabaseCaptureQueue

Defined in: packages/core/src/capture/db-queue/types.ts:73

The database queue: a PollableCaptureQueue plus multi-kind enqueue and a local wake.

readonly lifecycle: AdapterLifecycle

Defined in: packages/core/src/capture/db-queue/types.ts:74

Optional lifecycle hooks.

PollableCaptureQueue.lifecycle


readonly metadata: AdapterMetadata & object

Defined in: packages/core/src/adapters/metadata.ts:82

Adapter identity (mandatory).

readonly category: "capture-queue"

PollableCaptureQueue.metadata

ack(job): Promise<void>

Defined in: packages/core/src/adapters/capture-queue.ts:95

Acknowledge successful processing of a polled job.

PollableJob

Promise<void>

PollableCaptureQueue.ack


active(): Promise<QueueEntry[]>

Defined in: packages/core/src/adapters/capture-queue.ts:79

Queue entries that are queued or running.

Promise<QueueEntry[]>

PollableCaptureQueue.active


cancel(id): Promise<boolean>

Defined in: packages/core/src/capture/db-queue/types.ts:80

Cancel a job by job id, or every unfinished job of a build (every kind) by build id.

string

Promise<boolean>

PollableCaptureQueue.cancel


enqueue(job): Promise<void>

Defined in: packages/core/src/adapters/capture-queue.ts:75

Submit a build for capture. Resolves once the build is queued.

CaptureJob

Promise<void>

PollableCaptureQueue.enqueue


enqueueJob(job): Promise<string>

Defined in: packages/core/src/capture/db-queue/types.ts:78

Put a job of any kind on the queue; resolves to its job id.

QueueJobInput

Promise<string>


extend(job): Promise<LeaseRenewal>

Defined in: packages/core/src/capture/db-queue/types.ts:76

Extend the lease on an in-flight job by another job.leaseMs. Optional: queues without a renewable lease (e.g. Redis) omit it. May update job.receipt in place when the transport rotates it. Resolves "lost" only when the transport conclusively reports the message is no longer owned by this consumer; transient failures must reject.

PollableJob

Promise<LeaseRenewal>

PollableCaptureQueue.extend


inspect(job): Promise<LeaseRenewal>

Defined in: packages/core/src/capture/db-queue/types.ts:82

Read the job’s state without renewing its lease (the 5 s cancel check).

PollableJob

Promise<LeaseRenewal>

PollableCaptureQueue.inspect


nack(job, options?): Promise<void>

Defined in: packages/core/src/adapters/capture-queue.ts:100

Negatively acknowledge; requeue with optional delay when possible. requeue: false is a final failure: the job is dropped, and error says why for queues that keep a record of it.

PollableJob

number

string

boolean

Promise<void>

PollableCaptureQueue.nack


poll(options?): Promise<DatabaseJob | null>

Defined in: packages/core/src/capture/db-queue/types.ts:75

Poll for a single job; returns null if none available within waitMs.

number

Promise<DatabaseJob | null>

PollableCaptureQueue.poll


recent(limit): Promise<QueueEntry[]>

Defined in: packages/core/src/adapters/capture-queue.ts:81

The most recent queue entries, newest first.

number

Promise<QueueEntry[]>

PollableCaptureQueue.recent


optional setLogger(logger): void

Defined in: packages/core/src/adapters/metadata.ts:90

Bind the host-owned runtime logger. Called by the app/worker when present; factories must never create their own loggers — they only store what they are given (explicit options.logger wins over bound).

Logger

void

PollableCaptureQueue.setLogger


status(buildId): Promise<QueueEntry | null>

Defined in: packages/core/src/adapters/capture-queue.ts:77

Return the current status entry for a build, or null if untracked.

string

Promise<QueueEntry | null>

PollableCaptureQueue.status


waitForWork(ms): Promise<boolean>

Defined in: packages/core/src/capture/db-queue/types.ts:87

Resolve true when this instance enqueues a job (including one enqueued since the last poll began, so no wake-up is lost), false after ms.

number

Promise<boolean>