Skip to content

Job.dateStarted

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

Property Details

Usage: Read Only

Get: Date

  • Returns a JavaScript Date object representing when the job processing started.

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].dateStarted === The date the job processing started
}).catch(err => console.error(err))

Description

During the life cycle of a job the Job.dateStarted property may get updated several times. See the Job Retry document for an explanation of the job activation and failure process. Each time job processing is initiated the Job.dateStarted value gets updated.

Within the Queue object, Job.dateStarted is used to calculate job processing duration for logging.

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally