Optional
opts: QueueProOptionsReadonly
nameReadonly
qualifiedReturns this instance current default job options.
Returns the version of the Redis instance the client is connected to,
Adds a Job to the queue.
Optional
opts: JobsProOptionsAdds an array of jobs to the queue. This method may be faster than adding one job at a time in a sequence.
The array of jobs to add to the queue. Each job is defined by 3 properties, 'name', 'data' and 'opts'. They follow the same signature as 'Queue.add'.
Logs one row of job's log data.
The job id to log against.
string with log data to be logged.
Optional
keepLogs: numbermax number of log entries to keep (0 for unlimited).
The total number of log entries for this job so far.
Cleans jobs from a queue. Similar to drain but keeps jobs within a certain grace period.
The grace period
Max number of jobs to clean
Optional
type: "completed" | "failed" | "wait" | "active" | "delayed" | "prioritized" | "paused"The type of job to clean Possible values are completed, wait, active, paused, delayed, failed. Defaults to completed.
Id jobs from the deleted records
Returns the jobs that are in the "active" status.
Optional
start: numberzero based index from where to start returning jobs.
Optional
end: numberzero based index where to stop returning jobs.
Returns the jobs that are in the "completed" status.
Optional
start: numberzero based index from where to start returning jobs.
Optional
end: numberzero based index where to stop returning jobs.
Returns the jobs that are in the "delayed" status.
Optional
start: numberzero based index from where to start returning jobs.
Optional
end: numberzero based index where to stop returning jobs.
Returns the qualified job ids and the raw job data (if available) of the children jobs of the given parent job. It is possible to get either the already processed children, in this case an array of qualified job ids and their result values will be returned, or the pending children, in this case an array of qualified job ids will be returned. A qualified job id is a string representing the job id in a given queue, for example: "bull:myqueue:jobid".
The id of the parent job
"processed" | "pending"
Returns the jobs that are in the "failed" status.
Optional
start: numberzero based index from where to start returning jobs.
Optional
end: numberzero based index where to stop returning jobs.
Get the given group status.
The group id to get the status for.
GroupStatus - The status of the group or null if the group does not exist.
Get the group ids with jobs current jobs in them.
TODO: Support group id filtering.
Gets all the groups that are in a particular status.
GroupStatus so we can filter by status
start index, used for pagination.
end index, used for pagination.
an array of objects with the group id and 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
Rest
...types: JobType[]Returns the job counts for each type specified or every list/set in the queue by default.
Rest
...types: JobType[]An object, key (type) and value (count)
Returns the logs for a given Job.
the id of the job to get the logs for.
Optional
start: numberzero based index from where to start returning jobs.
Optional
end: numberzero based index where to stop returning jobs.
Optional
asc: booleanif true, the jobs will be returned in ascending order.
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).
Optional
start: numberStart point of the metrics, where 0 is the newest point to be returned.
Optional
end: numberEnd point of the metrics, where -1 is the oldest point to be returned.
Returns the jobs that are in the "prioritized" status.
Optional
start: numberzero based index from where to start returning jobs.
Optional
end: numberzero based index where to stop returning jobs.
Optional
start: numberOptional
end: numberOptional
asc: booleanGet all repeatable meta jobs.
Optional
start: numberOffset of first job to return.
Optional
end: numberOffset of last job to return.
Optional
asc: booleanDetermine the order in which jobs are returned based on their next execution time.
Returns the jobs that are in the "waiting" status.
Optional
start: numberzero based index from where to start returning jobs.
Optional
end: numberzero based index where to stop returning jobs.
Returns the jobs that are in the "waiting-children" status. I.E. parent jobs that have at least one child that has not completed yet.
Optional
start: numberzero based index from where to start returning jobs.
Optional
end: numberzero based index where to stop returning jobs.
Get the worker list related to the queue. i.e. all the known workers that are available to process jobs for this queue. Note: GCP does not support SETNAME, so this call will not work
Pauses the processing of this queue globally.
We use an atomic RENAME operation on the wait queue. Since we have blocking calls with BRPOPLPUSH on the wait queue, as long as the queue is renamed to 'paused', no new jobs will be processed (the current ones will run until finalized).
Adding jobs requires a LUA script to check first if the paused list exist and in that case it will add it there instead of the wait list.
Pauses the processing of a specific group globally.
Adding jobs requires a LUA script to check first if the paused list exist and in that case it will add it there instead of the wait list or group list.
Removes the given job from the queue as well as all its dependencies.
The id of the job to remove
Optional
opts: { Options to remove a job
Optional
remove1 if it managed to remove the job or 0 if the job or any of its dependencies were locked.
Removes a repeatable job.
Note: you need to use the exact same repeatOpts when deleting a repeatable job than when adding it.
job name
Optional
jobId: stringremoveRepeatableByKey
Removes a repeatable job by its key. Note that the key is the one used to store the repeatable job metadata and not one of the job iterations themselves. You can use "getRepeatableJobs" in order to get the keys.
getRepeatableJobs
Generated using TypeDoc
Returns a promise that resolves to a redis client. Normally used only by subclasses.