Skip to content

Event.completed

Grant Carthew edited this page Nov 19, 2016 · 2 revisions

Event Details

Subject: Job

Signature: (queueId, jobId, isRepeating)

Returns: queueId String

  • The id of the Queue object that completed processing the job.

Returns: jobId String

  • The Job.id for the job that has finished being processed successfully.

Returns: isRepeating Boolean

  • A flag to indicate the repeating status of the job.

Example:

const Queue = require('rethinkdb-job-queue')
const q = new Queue()

q.on('completed', (queueId, jobId, isRepeating) => {
  console.log('Processing Queue: ' + queueId)
  console.log('Job completed: ' + jobId)
  console.log('Is job repeating: ' + isRepeating)
})

Description

The completed event is raised whenever a job has finished being processed successfully.

See the Queue.process method and the changeFeed queue option for more detail.

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally