Skip to content

Queue.drop

Grant Carthew edited this page Nov 6, 2016 · 7 revisions

Method Signature

Queue.drop()

Returns: Promise => true

  • Will only ever resolve to true.

Example:

q.drop().then(() => {
  // The Queue object has dropped the backing table
}).catch(err => console.error(err))

Description

This method call should be use with caution. When you call Queue.drop the Queue object will drop 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 RethinkDB 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.drop without good reason.

It is assumed that you have finished with the queue after calling Queue.drop. Therefore the Queue object will be detached from the database after dropping the table. See the Queue.stop document for more detail.

If your intention is only to empty the queue, see the Queue.reset document.

As a final note, Queue.ready will resolve successfully after calling Queue.drop, however the resolved value will be false. See the Queue.ready document for more detail.

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally