Skip to content

Job.retryCount

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

Property Details

Usage: Read Only

Get: Number

  • Returns the current retryCount or number of retries the job has had.

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 retryCount = savedJobs[0].retryCount
  // retryCount === 0
}).catch(err => console.error(err))

Description

For detail on what the retryCount value is used for, see the Job Retry document.

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally