Skip to main content
zerotal

Documentation


Documentation / zerotal / queue / QueueConfigShape

Interface: QueueConfigShape

Defined in: packages/queue/src/config.ts:4

Properties

driver

driver: "sqlite" | "redis" | "sync"

Defined in: packages/queue/src/config.ts:6

Queue driver. Default: 'sqlite'


pollInterval

pollInterval: number

Defined in: packages/queue/src/config.ts:8

How often the worker polls for new jobs (ms). Default: 500


queues

queues: string[]

Defined in: packages/queue/src/config.ts:10

Queue names the worker listens on. Default: ['default']


workers

workers: number

Defined in: packages/queue/src/config.ts:17

Number of Bun Worker threads to spawn for job execution. When > 0, the HTTP server process processes jobs in background OS threads instead of on the main event loop - preserving HTTP throughput. Default: 0 (main-thread only; use queue:work command instead).


workerBootstrap?

optional workerBootstrap?: string

Defined in: packages/queue/src/config.ts:26

Absolute path or file URL to a module that imports all job classes. Each imported file must call JobRegistry.register(MyJob) (jobs do this automatically via the self-registration pattern). Required when workers > 0.

Example

workerBootstrap: new URL('../bootstrap/queue-worker.ts', import.meta.url).href