JobQueue
Type Parameters
Section titled “Type Parameters”Jobs extends object = JobMap
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new JobQueue<
Jobs>(definition,bull,deps):JobQueue<Jobs>
Parameters
Section titled “Parameters”definition
Section titled “definition”QueueDefinition<Jobs>
Queue
The underlying BullMQ queue, for reads this class does not wrap (counts, getJob).
JobQueueDeps
Returns
Section titled “Returns”JobQueue<Jobs>
Properties
Section titled “Properties”
readonlybull:Queue
The underlying BullMQ queue, for reads this class does not wrap (counts, getJob).
definition
Section titled “definition”
readonlydefinition:QueueDefinition<Jobs>
readonlypause:QueuePause
The one pause of this queue; see QueuePause.
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get name():
string
Returns
Section titled “Returns”string
Methods
Section titled “Methods”add<
Name>(name,data,options):Promise<AddResult>
Enqueues one job. Rejects at once while Redis is unreachable.
Type Parameters
Section titled “Type Parameters”Name extends string
Parameters
Section titled “Parameters”Name
Jobs[Name]
options
Section titled “options”Returns
Section titled “Returns”Promise<AddResult>
pauseFor()
Section titled “pauseFor()”pauseFor(
ms):Promise<number>
Stops the queue from handing out jobs for at least ms; see QueuePause.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Promise<number>
releaseDedupe()
Section titled “releaseDedupe()”releaseDedupe(
key):Promise<boolean>
Ends a dedupe window early, so the next add() with this key enqueues.
For a deliberate restart (an admin re-sending a failed announcement).
Resolves to whether a window was open.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<boolean>