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) => ;
}
-
Extends:
PollingJobQueueStrategy
-
Implements:
InspectableJobQueueStrategy
init
method
(injector: Injector) =>
destroy
method
() =>
add
next
method
(queueName: string) => Promise<Job | undefined>
update
method
(job: Job<any>) => Promise<void>
findMany
method
(options?: JobListOptions) => Promise<PaginatedList<Job>>
findOne
findManyById
removeSettledJobs
method
(queueNames: string[] = [], olderThan?: Date) =>