Skip to content

Queue.ready

Grant Carthew edited this page Oct 1, 2016 · 3 revisions

Method Signature

Queue.ready()

Returns: Promise => Boolean

Example:

q.ready().then((isReady) => {
  // isReady === true
}).catch(err => console.error(err))

Description

Although this looks like a really important method on the Queue object, it is not. All the Queue object methods that touch the database rely on the Queue.ready() Promise. Therefore you do not need to use it yourself. As an example, calling Queue.addJob returns a Promise. That Promise originated from Queue.ready.

As a best practice, avoid using the Queue.ready method. That said, there is nothing wrong with using it.

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally