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
Members
init
method
type:
(injector: Injector) =>
add
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
findManyById
removeSettledJobs
async method
type:
(queueNames: string[] = [], olderThan?: Date) =>