🚨 Announcing Vendure v2 Beta

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 {
  async init(injector: Injector) => Promise<void>;
  async destroy() => ;
  async add(job: Job<Data>) => Promise<Job<Data>>;
  async cancelJob(jobId: string) => Promise<Job | undefined>;
  async findMany(options?: JobListOptions) => Promise<PaginatedList<Job>>;
  async findManyById(ids: ID[]) => Promise<Job[]>;
  async findOne(id: ID) => Promise<Job | undefined>;
  async removeSettledJobs(queueNames?: string[], olderThan?: Date) => Promise<number>;
  async start(queueName: string, process: (job: Job<Data>) => Promise<any>) => Promise<void>;
  async stop(queueName: string, process: (job: Job<Data>) => Promise<any>) => Promise<void>;
}

Implements

Members

init

async method
type:
(injector: Injector) => Promise<void>

destroy

async method
type:
() =>

add

async method
type:
(job: Job<Data>) => Promise<Job<Data>>

cancelJob

async method
type:
(jobId: string) => Promise<Job | undefined>

findMany

async method
type:
(options?: JobListOptions) => Promise<PaginatedList<Job>>

findManyById

async method
type:
(ids: ID[]) => Promise<Job[]>

findOne

async method
type:
(id: ID) => Promise<Job | undefined>

removeSettledJobs

async method
type:
(queueNames?: string[], olderThan?: Date) => Promise<number>

start

async method
type:
(queueName: string, process: (job: Job<Data>) => Promise<any>) => Promise<void>

stop

async method
type:
(queueName: string, process: (job: Job<Data>) => Promise<any>) => Promise<void>