SqlJobQueueStrategy

SqlJobQueueStrategy

A JobQueueStrategy which uses the configured SQL database to persist jobs in the queue. This strategy is used by the DefaultJobQueuePlugin.

Signature

class SqlJobQueueStrategy extends PollingJobQueueStrategy implements InspectableJobQueueStrategy {
  init(injector: Injector) => ;
  destroy() => ;
  async add(job: Job<Data>) => Promise<Job<Data>>;
  async next(queueName: string) => Promise<Job | undefined>;
  async update(job: Job<any>) => Promise<void>;
  async findMany(options?: JobListOptions) => Promise<PaginatedList<Job>>;
  async findOne(id: ID) => Promise<Job | undefined>;
  async findManyById(ids: ID[]) => Promise<Job[]>;
  async removeSettledJobs(queueNames: string[] = [], olderThan?: Date) => ;
}

Extends

Implements

Members

init

method
type:
(injector: Injector) =>

destroy

method
type:
() =>

add

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

next

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

update

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

findMany

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

findOne

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

findManyById

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

removeSettledJobs

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