Skip to content

Queue.resume

Grant Carthew edited this page Sep 29, 2016 · 5 revisions

Method Signature

Queue.resume(global)

Parameter: global Boolean

  • true for a global queue resume, false or undefined to only resume the local Queue object.

Returns: Promise => true

  • Will only ever resolve to true.

Example:

q.resume().then(() => {
  // The queue will now be running.
}).catch(err => console.error(err))

Description

There is only one time you should call Queue.resume and that is after calling Queue.pause. There is nothing wrong with pausing and resuming the Queue object.

If you pass the global parameter as true then a state document is written to the queue database table which in turn sends a change feed to all Queue objects connected to the same queue. This will cause all Queue objects to resume processing jobs.

If you pass the global parameter as false then only the local Queue object will resume processing.

Warning: You can not resume a stopped Queue object. If you have a stopped Queue object, remove any reference to it and create a new Queue object.

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally