DatabaseCaptureQueueOptions
Defined in: packages/core/src/capture/db-queue/types.ts:16
Options of createDatabaseCaptureQueue.
Properties
Section titled “Properties”kinds?
Section titled “kinds?”
optionalkinds?: readonlyCaptureJobKind[]
Defined in: packages/core/src/capture/db-queue/types.ts:18
Job kinds this instance polls (default ["capture"]); enqueue accepts every kind.
leaseMs?
Section titled “leaseMs?”
optionalleaseMs?:number
Defined in: packages/core/src/capture/db-queue/types.ts:20
Lease granted per attempt, renewed by a heartbeat and by progress (default DEFAULT_LEASE_MS, 5 min; testing.leaseSeconds).
logger?
Section titled “logger?”
optionallogger?:Logger
Defined in: packages/core/src/capture/db-queue/types.ts:30
Explicit logger override; the host normally binds one through setLogger.
optionalnow?: () =>number
Defined in: packages/core/src/capture/db-queue/types.ts:26
Clock in epoch ms (default Date.now); tests inject one to drive leases and visibility.
Returns
Section titled “Returns”number
onExhausted?
Section titled “onExhausted?”
optionalonExhausted?: (job,error) =>Promise<void>
Defined in: packages/core/src/capture/db-queue/types.ts:36
Called after a job failed because its last attempt lost its lease: nothing was running to
record the failure, so the host writes it (a build left capturing). May run on every
instance that finds the job, so it must be idempotent; a throw is logged and ignored.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
owner?
Section titled “owner?”
optionalowner?:string
Defined in: packages/core/src/capture/db-queue/types.ts:24
Identity written on the attempt rows this instance holds (default host, pid and a random tag).
retries?
Section titled “retries?”
optionalretries?:number
Defined in: packages/core/src/capture/db-queue/types.ts:22
Retries after the first attempt (testing.retries, default 2: three attempts in total).
timers?
Section titled “timers?”
optionaltimers?:QueueTimers
Defined in: packages/core/src/capture/db-queue/types.ts:28
Timers of the local wake wait (default the global timers); tests inject a manual clock.