-
Notifications
You must be signed in to change notification settings - Fork 16
Job Options
To process anything using rethinkdb-job-queue you need to create Job objects. These Job objects are created by using Queue.createJob. When a job is created there are four options available for you to customize how the job is processed within the queue.
The priority option allows you to control the order of processing for the jobs in the queue.
There are seven priority values as follows:
| Name | Number | Description |
|---|---|---|
| lowest | 60 | The last jobs to get processed |
| low | 50 | Not as important and a typical job |
| normal | 40 | The default job priority |
| medium | 30 | For more important jobs |
| high | 20 | Need to be processed first |
| highest | 10 | These jobs will be processed before all others |
The Number column in the table above is showing the value that gets stored in the database for a specific priority. Jobs within your code have the Name values above. These names get converted to numbers on adding the job to the queue.
A higher priority job will always get processed by the queue before the lower priority jobs. As an example, if you have 100 'normal' priority jobs, and you add a 'medium' priority job to the queue, the 'medium' priority job will be the next job to get processed.
- 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