Skip to content

Queue.review

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

Method Signature

Queue.review()

Returns: Promise => Object

  • Object containing two properties, reviewed and removed.
  • The reviewed property contains the number of jobs ready for retry after failure.
  • The removed property contains the number of jobs that have been removed.

Example:

q.review().then((result) => {
  // result.reviewed === Integer
  // result.removed === Integer
}).catch(err => console.error(err))

Description

For detail on what Queue.review does please see the Queue Master document. The Queue.review method exposes the review process to the consumer just for convenience. If you wish to force a once off review of the database, call this method.

Note that calling Queue.review does not change or interfere with the normal database review schedule.

Consider calling Queue.summary and inspecting the results before calling Queue.review.

Example

This example forces a database review.

const Queue = require('rethinkdb-job-queue')
const q = new Queue()

q.review().then((result) => {
  console.log('The queue review process has been run.')
  console.log(`Reviewed ${result.reviewed} jobs.`)
  console.log(`Removed ${result.removed} jobs.`)
}).catch(err => console.error(err))

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally