SqlJobQueueStrategy

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 implements JobQueueStrategy {
  init(injector: Injector) => ;
  async add(job: Job) => Promise<Job>;
  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) => ;
}

Implements

  • JobQueueStrategy

Members

init

method
type:
(injector: Injector) =>

add

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

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) =>