Skip to content

Event.pausing

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

Event Details

Subject: Queue

Signature: (qid)

Returns: qid String

  • The Queue.id for the Queue object which is being paused.

Example:

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

q.on('pausing', (qid) => {
  console.log('Queue pausing: ' + qid)
})

Description

The pausing event is raised when a Queue object is being paused by calling the Queue.pause method. This is a local process event only.

Because the Queue.pause method waits for running jobs to finish, it could be some time before the Queue object is paused. You can use the pausing event to do some tidy up before the Queue object is completely paused.

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally