Skip to content

Job API

Grant Carthew edited this page Sep 30, 2016 · 22 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.

Note: Although the properties below do not indicate [Read Only], do not change them without first looking at the documentation. They have not been made as getters or setters to facilitate serialization.

API Type Description
Job.setPriority Method Changes the jobs priority value
Job.setTimeout Method Changes the jobs timeout value
Job.setRetryMax Method Changes the jobs retryMax value
Job.setRetryDelay Method Changes the jobs retryDelay value
Job.setDateEnable Method Changes the jobs dateEnable value
Job.setProgress Method Updates the jobs progress
Job.update Method Updates the jobs properties
Job.getCleanCopy Method Returns a data copy without the Queue reference
Job.createLog Method Creates a log object
Job.addLog Method Saves a log entry against the job
Job.id Property The UUID for the job
Job.priority Property Priority value for the job
Job.timeout Property The processing timeout value for the job
Job.retryDelay Property After failure, the delay before retry
Job.retryMax Property Maximum number or job retries
Job.retryCount Property How many times the job has been retried
Job.progress Property Percentage of progress for the job
Job.status Property Current status for the job
Job.log Property Array of log entries
Job.dateCreated Property Date the job was created
Job.dateEnable Property Date the job will be enabled
Job.dateStarted Property Date the job processing started
Job.dateFinished Property Date the job processing finished
Job.queueId Property Queue id that last updated the job

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally