-
Notifications
You must be signed in to change notification settings - Fork 16
Queue.stop
Returns: Promise
=> true
- Will only ever resolve to
true
.
Example:
q.stop().then(() => {
// The Queue object is now stopped
}).catch(err => console.error(err))
The Queue.stop
method call is very different to Queue.pause. If a Queue object is paused, you can resume it easily.
When you call Queue.stop
the Queue object is detached from the database. The RethinkDBDash driver connection pool is drained and the Queue object, for all intents and purposes, is dead.
It is easy to recover from if you need to. Simply remove all references to the current Queue object and create a new one const q = new Queue()
.
Calling Queue.stop
will first pause the Queue object. This means it could take some time to resolve the Promise. The method will not resolve until all running jobs have completed.
As a final note, Queue.ready will resolve successfully after calling Queue.stop
, however the resolved value will be false
. See the Queue.ready document for more detail.
- 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