Skip to content

basalt / queue/src / DEFAULT_LIST_STATES

Variable: DEFAULT_LIST_STATES ​

> const DEFAULT_LIST_STATES: readonly JobState[]

Defined in: queue/src/driver.ts:63

States QueueDriver.list returns when the caller picks none.

completed and failed come FIRST and are included on purpose: a worker drains waiting in milliseconds, so a healthy queue has waiting: 0, active: 0 nearly always. Defaulting to only those would answer "did my job run?" with an empty list on a queue that is working perfectly — the classic false alarm. delayed is left out of the default (it is a deliberate, separate question); ask for it explicitly.

Released under the MIT License.