Skip to content

Job.dateFinished

Grant Carthew edited this page Oct 1, 2016 · 4 revisions

Property Details

Usage: Read Only

Get: Date

  • Returns a JavaScript Date object representing when the job processing failed or completed.

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) => {
  // savedJobs[0].dateFinished === The date the job processing failed or completed
}).catch(err => console.error(err))

Description

The Job.dateFinished value can be updated when one of the following occurs.

Once a job is done and dusted its status in the queue database table will be either completed, cancelled, or terminated. A job in this state is considered to be finished.

Depending on the removeFinishedJobs Queue Master option, the Job.dateFinished value is used to determine if the job should be removed from the database. Specifically if removeFinishedJobs is set to a Number and not disabled.

See the Queue Options and Queue Master documents for more detail.

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally