-
Notifications
You must be signed in to change notification settings - Fork 16
Queue API
Grant Carthew edited this page Mar 20, 2017
·
18 revisions
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.findJob | Method | Returns an array of jobs based on a predicate filter |
Queue.findJobByName | Method | Returns an array of jobs based on a string name |
Queue.containsJobByName | Method | Returns a boolean if a job with the name exists |
Queue.cancelJob | Method | Permanently cancels one or more jobs in the Queue |
Queue.reanimateJob | Method | Re-enables a job that was cancelled or terminated |
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.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.name | Property | Name of the Queue (Database Table) [Read Only] |
Queue.r | Property | The rethinkdbdash instance [Read Only] |
Queue.id | Property | Queue identification string [Read Only] |
Queue.jobOptions | Property | Defines the default options applied to new jobs |
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.limitJobLogs | Property | Limits maximum job log entries [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] |
Event.ready | Event | The Queue object is ready |
Event.added | Event | Job has been added to the queue |
Event.updated | Event | Job has been updated in the queue |
Event.active | Event | Job status has been changed to active
|
Event.processing | Event | Job is being processed |
Event.progress | Event | Job progress has been updated |
Event.log | Event | Custom Job log entry has been added |
Event.pausing | Event | Queue object is been paused |
Event.paused | Event | Queue object has been paused |
Event.resumed | Event | Queue object has been resumed |
Event.completed | Event | Job processing has been completed |
Event.cancelled | Event | Job has been cancelled |
Event.failed | Event | Job has failed processing |
Event.terminated | Event | Job has failed and will not be retried |
Event.reanimated | Event | Job has been reanimated |
Event.removed | Event | Job has been removed from the queue |
Event.idle | Event | Queue is not processing jobs |
Event.reset | Event | All jobs on the queue have been removed |
Event.error | Event | An error has occurred |
Event.reviewed | Event | Queue Master review process has completed |
Event.detached | Event | RethinkDB connection pool has been drained |
Event.stopping | Event | Queue is stopping |
Event.stopped | Event | Queue is stopped and detached |
Event.dropped | Event | Queue database table has been dropped |
- 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