Skip to content

Documentation / @tenancy-node/queue-bullmq / BullmqQueue

Class: BullmqQueue ​

Defined in: index.ts:28

Cola sobre BullMQ (Redis/Valkey): trabajos persistentes, reintentos con espera y varios workers en distintos procesos. Cada trabajo lleva el tenantId.

Implements ​

Constructors ​

Constructor ​

new BullmqQueue(options?): BullmqQueue

Defined in: index.ts:35

Parameters ​

options? ​

BullmqOptions = {}

Returns ​

BullmqQueue

Properties ​

name ​

readonly name: "bullmq" = 'bullmq'

Defined in: index.ts:29

Implementation of ​

QueueDriver.name

Methods ​

close() ​

close(): Promise<void>

Defined in: index.ts:109

Returns ​

Promise<void>

Implementation of ​

QueueDriver.close


counts() ​

counts(): Promise<Record<string, number>>

Defined in: index.ts:105

Cantidad de trabajos por estado (para métricas y el panel).

Returns ​

Promise<Record<string, number>>


enqueue() ​

enqueue(job): Promise<string>

Defined in: index.ts:52

Parameters ​

job ​

NewJob

Returns ​

Promise<string>

Implementation of ​

QueueDriver.enqueue


ping() ​

ping(): Promise<void>

Defined in: index.ts:100

Returns ​

Promise<void>

Implementation of ​

QueueDriver.ping


process() ​

process(processor, options): Promise<QueueWorker>

Defined in: index.ts:69

Empieza a procesar. Si processor lanza, el driver reintenta según las opciones del trabajo.

Parameters ​

processor ​

JobProcessor

options ​
concurrency ​

number

Returns ​

Promise<QueueWorker>

Implementation of ​

QueueDriver.process

Publicado bajo la licencia MIT.