Skip to content

Queue.reset

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

Method Signature

Queue.reset()

Returns: Promise => Number

  • Returns the number of jobs removed from the queue.

Example:

q.reset().then((total) => {
  console.log('Total jobs reset: ' + total)
}).catch(err => console.error(err))

Description

This method call should be used with caution. When you call Queue.reset the Queue object will delete all jobs in the queue backing table.

There is no function within rethinkdb-job-queue that can drop the database.

There is no recovery from this unless you have a backup of your RethinDB database.

As a best practice, never call your queue the same name as another table within the database. See the Queue Options document for more detail.

Do not call Queue.reset without good reason.

Calling Queue.reset does not remove the queue backing table. If that is your intention see the Queue.drop document.

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally