The name of the queue.
Options for the queue.
An optional "Connection" class used to instantiate a Connection. This is useful for testing with mockups and/or extending the Connection class and passing an alternate implementation.
Readonly
nameThe name of the queue.
Options for the queue.
Returns a promise that resolves to a redis client. Normally used only by subclasses.
Returns the version of the Redis instance the client is connected to,
Closes the connection and returns a promise that resolves when the connection is closed.
Returns the number of jobs waiting to be processed. This includes jobs that are "waiting" or "delayed".
Force disconnects a connection.
Emits an event. Normally used by subclasses to emit events.
The emitted event.
Returns the jobs that are in the "active" status.
zero based index from where to start returning jobs.
zeroo based index where to stop returning jobs.
Returns the number of jobs in active status.
Returns the jobs that are in the "completed" status.
zero based index from where to start returning jobs.
zeroo based index where to stop returning jobs.
Returns the number of jobs in completed status.
Returns the jobs that are in the "delayed" status.
zero based index from where to start returning jobs.
zeroo based index where to stop returning jobs.
Returns the number of jobs in delayed status.
Returns the jobs that are in the "failed" status.
zero based index from where to start returning jobs.
zeroo based index where to stop returning jobs.
Returns the number of jobs in failed status.
Job counts by type
Queue#getJobCountByTypes('completed') => completed count Queue#getJobCountByTypes('completed,failed') => completed + failed count Queue#getJobCountByTypes('completed', 'failed') => completed + failed count Queue#getJobCountByTypes('completed', 'waiting', 'failed') => completed + waiting + failed count
Returns the job counts for each type specified or every list/set in the queue by default.
An object, key (type) and value (count)
Returns the logs for a given Job.
the id of the job to get the logs for.
zero based index from where to start returning jobs.
zeroo based index where to stop returning jobs.
if true, the jobs will be returned in ascending order.
Returns the jobs that are on the given statuses (note that JobType is synonym for job status)
Get queue metrics related to the queue.
This method returns the gathered metrics for the queue. The metrics are represented as an array of job counts per unit of time (1 minute).
Start point of the metrics, where 0 is the newest point to be returned.
End point of the metrics, where -1 is the oldest point to be returned.
Get queue events list related to the queue.
Get queue schedulers list related to the queue.
Returns the jobs that are in the "waiting" status.
zero based index from where to start returning jobs.
zeroo based index where to stop returning jobs.
Returns the jobs that are in the "waiting" status.
zero based index from where to start returning jobs.
zeroo based index where to stop returning jobs.
Returns the number of jobs in waiting-children status.
Returns the number of jobs in waiting or paused statuses.
Get the worker list related to the queue. i.e. all the known workers that are available to process jobs for this queue.
QueueGetters
Description
Provides different getters for different aspects of a queue.