-
Notifications
You must be signed in to change notification settings - Fork 16
Queue.reset
Grant Carthew edited this page Aug 18, 2016
·
8 revisions
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)
})
This method call should be use 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 you point the Queue object at. 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.
- Introduction
- Tutorial
- Queue Constructor
- Queue Connection
- Queue Options
- Queue PubSub
- Queue Master
- Queue Events
- State Document
- Job Processing
- Job Options
- Job Status
- Job Retry
- Job Repeat
- Job Logging
- Job Editing
- Job Schema
- Job Name
- Complex Job
- Delayed Job
- Cancel Job
- Error Handling
- Queue.createJob
- Queue.addJob
- Queue.getJob
- Queue.findJob
- Queue.findJobByName
- Queue.containsJobByName
- Queue.cancelJob
- Queue.reanimateJob
- Queue.removeJob
- Queue.process
- Queue.review
- Queue.summary
- Queue.ready
- Queue.pause
- Queue.resume
- Queue.reset
- Queue.stop
- Queue.drop
- Queue.Job
- Queue.host
- Queue.port
- Queue.db
- Queue.name
- Queue.r
- Queue.id
- Queue.jobOptions [R/W]
- Queue.changeFeed
- Queue.master
- Queue.masterInterval
- Queue.removeFinishedJobs
- Queue.running
- Queue.concurrency [R/W]
- Queue.paused
- Queue.idle
- Event.ready
- Event.added
- Event.updated
- Event.active
- Event.processing
- Event.progress
- Event.log
- Event.pausing
- Event.paused
- Event.resumed
- Event.completed
- Event.cancelled
- Event.failed
- Event.terminated
- Event.reanimated
- Event.removed
- Event.idle
- Event.reset
- Event.error
- Event.reviewed
- Event.detached
- Event.stopping
- Event.stopped
- Event.dropped
- Job.setName
- Job.setPriority
- Job.setTimeout
- Job.setDateEnable
- Job.setRetryMax
- Job.setRetryDelay
- Job.setRepeat
- Job.setRepeatDelay
- Job.updateProgress
- Job.update
- Job.getCleanCopy
- Job.addLog
- Job.getLastLog