Skip to content

Introduction

Grant Carthew edited this page Aug 20, 2016 · 19 revisions

How does rethinkdb-job-queue work?

The main component of rethinkdb-job-queue is the Queue object.

Throughout this documentation you will see references to either the "Queue object" or the "queue". So what do these terms mean?

  • "Queue object" is referencing the local JavaScript object created by calling const q = new Queue().
  • "queue" is referencing the list of jobs that need to be processed either by a local Queue object or by another Node.js process Queue object.

As you can see above, it is easy to create a Queue object. Here is a slightly more complete example.

const Queue = require('rethinkdb-job-queue')
const q = new Queue({ name: 'EmailJobs' })

You will notice in the example above that the name of the queue is being set to 'EmailJobs' by changing the Queue-Options. If this is the first time you have created a Queue object called 'EmailJobs' then the following will take place as part of the instantiation of the Queue object.

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally