Skip to main content

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() => ;
add(job: Job<Data>, jobOptions?: JobQueueStrategyJobOptions<Data>) => Promise<Job<Data>>;
next(queueName: string) => Promise<Job | undefined>;
update(job: Job<any>) => Promise<void>;
findMany(options?: JobListOptions) => Promise<PaginatedList<Job>>;
findOne(id: ID) => Promise<Job | undefined>;
findManyById(ids: ID[]) => Promise<Job[]>;
removeSettledJobs(queueNames: string[] = [], olderThan?: Date) => ;
}

init

method
(injector: Injector) =>

destroy

method
() =>

add

method
(job: Job<Data>, jobOptions?: JobQueueStrategyJobOptions<Data>) => Promise<Job<Data>>

next

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

update

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

findMany

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

findOne

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

findManyById

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

removeSettledJobs

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