Skip to content

Job.progress

Grant Carthew edited this page Aug 19, 2016 · 5 revisions

Property Details

Usage: Read Only

Get: Number

  • The current reported progress of the job in percentage.

Example:

const Queue = require('rethinkdb-job-queue')
const q = new Queue()
let job = q.createJob()

q.addJob(job).then(() => {
  return q.getJob(job.id)
}).then((savedJobs) => {
  let pc = savedJobs[0].progress
  // pc === 0
}).catch((err) => {
  console.log(err)
})

Description

The job progress is updated by the job handler function passed to Queue.process and hence is in the consumers control. For detail on how progress works, see the Job.setProgress document.

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally