nextPollDelay
nextPollDelay(
lastWorkAt,now,cadence?,random?):number
Defined in: packages/core/src/capture/db-queue/cadence.ts:35
Delay before the next poll: the active interval while the last job was seen (found by a poll or
queued locally) within the active window, otherwise the idle interval; plus jitter in
[0, jitter) of it, so instances started together drift apart instead of probing in lockstep.
Parameters
Section titled “Parameters”lastWorkAt
Section titled “lastWorkAt”number | null
number
cadence?
Section titled “cadence?”PollCadence = DEFAULT_CADENCE
random?
Section titled “random?”() => number
Returns
Section titled “Returns”number