BullMQJobQueueStrategy
BullMQJobQueueStrategy
This JobQueueStrategy uses BullMQ to implement a push-based job queue on top of Redis. It should not be used alone, but as part of the BullMQJobQueuePlugin.
Signature
class BullMQJobQueueStrategy implements InspectableJobQueueStrategy {
init(injector: Injector) => Promise<void>;
destroy() => ;
add(job: Job<Data>) => Promise<Job<Data>>;
cancelJob(jobId: string) => Promise<Job | undefined>;
findMany(options?: JobListOptions) => Promise<PaginatedList<Job>>;
findManyById(ids: ID[]) => Promise<Job[]>;
findOne(id: ID) => Promise<Job | undefined>;
removeSettledJobs(queueNames?: string[], olderThan?: Date) => Promise<number>;
start(queueName: string, process: (job: Job<Data>) => Promise<any>) => Promise<void>;
stop(queueName: string, process: (job: Job<Data>) => Promise<any>) => Promise<void>;
}
- Implements:
InspectableJobQueueStrategy
init
method
(injector: Injector) => Promise<void>
destroy
method
() =>
add
method
(job: Job<Data>) => Promise<Job<Data>>
cancelJob
method
(jobId: string) => Promise<Job | undefined>
findMany
method
(options?: JobListOptions) => Promise<PaginatedList<Job>>
findManyById
method
(ids: ID[]) => Promise<Job[]>
findOne
method
(id: ID) => Promise<Job | undefined>
removeSettledJobs
method
(queueNames?: string[], olderThan?: Date) => Promise<number>
start
method
(queueName: string, process: (job: Job<Data>) => Promise<any>) => Promise<void>
stop
method
(queueName: string, process: (job: Job<Data>) => Promise<any>) => Promise<void>