Skip to content

Job API

Grant Carthew edited this page Feb 10, 2017 · 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.setName Method Changes the jobs name value
Job.setPriority Method Changes the jobs priority value
Job.setTimeout Method Changes the jobs timeout value
Job.setDateEnable Method Changes the jobs dateEnable value
Job.setRetryMax Method Changes the jobs retryMax value
Job.setRetryDelay Method Changes the jobs retryDelay value
Job.setRepeat Method Changes the jobs repeat value
Job.setRepeatDelay Method Changes the jobs repeatDelay value
Job.updateProgress Method Updates the jobs progress
Job.update Method Updates the jobs properties
Job.getCleanCopy Method Returns a data copy without the Queue reference
Job.addLog Method Saves a log entry against the job
Job.getLastLog Method Retrieves the latest or last log entry
Job.id Property The UUID for the job
Job.name Property Name value 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.repeat Property The job repeating status
Job.repeatDelay Property The delay between repeat job processing
Job.processCount Property The number of job process attempts
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