Skip to content

Queue API

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

Description

There are two main public objects within rethinkdb-job-queue being the Queue object and the Job object.

The Queue object is your main interface. You use the Queue to create Job objects and also to add the Job objects to the job queue. The Queue is also used to process your jobs.

Job objects are stored in the RethinkDB database and contain the details or data required for your job processing.

API Type Description
Queue.createJob Method Used to create one or more Job objects
Queue.addJob Method Adds Job objects to the queue for processing
Queue.getJob Method Returns updated jobs from the Queue
Queue.cancelJob Method Permanently cancel one or more jobs in the Queue
Queue.removeJob Method Permanently removes one or more jobs from the Queue
Queue.process Method Accepts your processing handler function
Queue.review Method Initiates the Queue review process
Queue.summary Method Produces a Queue status summary report object
Queue.ready Method Indicates the ready state of the Queue
Queue.pause Method Use to pause the Queue
Queue.resume Method Use to resume a paused Queue
Queue.reset Method Removes all jobs from the Queue or empties the Queue
Queue.stop Method Stops the Queue for graceful shutdown
Queue.drop Method Stops the Queue and drops the database table
Queue.jobOptions Property Defines the default options applied to new jobs
Queue.name Property Name of the Queue (Database Table) [Read Only]
Queue.id Property Queue identification string [Read Only]
Queue.host Property RethinkDB host name or IP address [Read Only]
Queue.port Property RethinkDB access port number [Read Only]
Queue.db Property RethinkDB database name [Read Only]
Queue.r Property The rethinkdbdash instance [Read Only]
Queue.connection Property Alias for Queue.r [Read Only]
Queue.changeFeed Property Queue change feed instance [Read Only]
Queue.master Property Queue master status [Read Only]
Queue.masterInterval Property The master Queue review interval [Read Only]
Queue.removeFinishedJobs Property Queue clean up configuration [Read Only]
Queue.running Property Number of jobs being processed [Read Only]
Queue.concurrency Property Maximum number of concurrent jobs
Queue.paused Property Pause state of the Queue [Read Only]
Queue.idle Property Idle state of the Queue [Read Only]

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally