Skip to content

Job.dateCreated

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 was created.

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].dateCreated === The date the job was created
}).catch(err => console.error(err))

Description

When jobs are retrieved from the queue database table, if they all have the same priority they are ordered by Job.dateCreated.

Apart from that the Job.dateCreated value is handy for logging, debugging, or reporting.

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally