-
Notifications
You must be signed in to change notification settings - Fork 16
Queue.review
Grant Carthew edited this page Oct 1, 2016
·
4 revisions
Returns: Promise
=> Object
- Object containing two properties,
reviewed
andremoved
. - 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))
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
.
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))
- Introduction
- Tutorial
- Queue Constructor
- Queue Connection
- Queue Options
- Queue PubSub
- Queue Master
- Queue Events
- State Document
- Job Processing
- Job Options
- Job Status
- Job Retry
- Job Repeat
- Job Logging
- Job Editing
- Job Schema
- Job Name
- Complex Job
- Delayed Job
- Cancel Job
- Error Handling
- Queue.createJob
- Queue.addJob
- Queue.getJob
- Queue.findJob
- Queue.findJobByName
- Queue.containsJobByName
- Queue.cancelJob
- Queue.reanimateJob
- Queue.removeJob
- Queue.process
- Queue.review
- Queue.summary
- Queue.ready
- Queue.pause
- Queue.resume
- Queue.reset
- Queue.stop
- Queue.drop
- Queue.Job
- Queue.host
- Queue.port
- Queue.db
- Queue.name
- Queue.r
- Queue.id
- Queue.jobOptions [R/W]
- Queue.changeFeed
- Queue.master
- Queue.masterInterval
- Queue.removeFinishedJobs
- Queue.running
- Queue.concurrency [R/W]
- Queue.paused
- Queue.idle
- Event.ready
- Event.added
- Event.updated
- Event.active
- Event.processing
- Event.progress
- Event.log
- Event.pausing
- Event.paused
- Event.resumed
- Event.completed
- Event.cancelled
- Event.failed
- Event.terminated
- Event.reanimated
- Event.removed
- Event.idle
- Event.reset
- Event.error
- Event.reviewed
- Event.detached
- Event.stopping
- Event.stopped
- Event.dropped
- Job.setName
- Job.setPriority
- Job.setTimeout
- Job.setDateEnable
- Job.setRetryMax
- Job.setRetryDelay
- Job.setRepeat
- Job.setRepeatDelay
- Job.updateProgress
- Job.update
- Job.getCleanCopy
- Job.addLog
- Job.getLastLog