Skip to content

Queue.pause

Grant Carthew edited this page Aug 18, 2016 · 3 revisions

Method Signature

Queue.pause()

Returns: Promise => true

  • Will only ever return true.

Example:

q.pause().then(() => {
  // The Queue object is now paused
}).catch((err) => {
  console.error(err)
})

Description

The Queue.pause method is for pausing the local Queue object. There is no global queue pause. After calling Queue.pause your code will wait until all running jobs have finished before resolving the Promise.

If you are wanting to stop the queue gracefully, try Queue.stop instead of Queue.pause.

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally