PollingJobQueueStrategy
This class allows easier implementation of JobQueueStrategy in a polling style.
Instead of providing JobQueueStrategy start() you should provide a next method.
This class should be extended by any strategy which does not support a push-based system to notify on new jobs. It is used by the SqlJobQueueStrategy and InMemoryJobQueueStrategy.
- Extends: InjectableJobQueueStrategy
concurrency
property
number | ((queueName: string) => number)pollInterval
property
number | ((queueName: string) => number)setRetries
property
(queueName: string, job: Job) => numberbackOffStrategy
property
BackoffStrategygracefulShutdownTimeout
property
numberactiveQueues
property
start
method
(queueName: string, process: (job: Job<Data>) => Promise<any>) => stop
method
(queueName: string, process: (job: Job<Data>) => Promise<any>) => cancelJob
next
method
(queueName: string) => Promise<Job | undefined>Should return the next job in the given queue. The implementation is responsible for returning the correct job according to the time of creation.
update
method
(job: Job) => Promise<void>Update the job details in the store.
findOne
Returns a job by its id.
Was this chapter helpful?