Skip to content

Queue.createJob

Grant Carthew edited this page Jul 27, 2016 · 27 revisions

Description

To add jobs to the queue you need to have the basic structure of a job required for rethinkdb-job-queue to be able to work with the data.

You use the Queue.createJob() method to get the basic job structure which will produce a job object that looks like the following:

{
  q: [object Object], // This is a reference to the Queue that created the job
  id: '07290a09-269b-4211-9698-ea40f69962b2', // This will be the jobs id in the database
  priority: 'normal',
  timeout: 300,
  retryDelay: 600,
  retryMax: 3,
  retryCount: 0,
  progress: 0,
  status: 'created',
  log: [],
  dateCreated: 2016-07-27T22:54:45.811Z,
  dateRetry: 2016-07-27T22:54:45.811Z,
  queueId: 'WebDev:rjqJobQueue:rjqJobList:11761:89c2d49e-5a04-4d9b-b08e-48908625ea64',
}

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally