Skip to content

Commit

Permalink
GitBook: [#97] No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf authored and gitbook-bot committed Mar 8, 2022
1 parent 3f46a47 commit d196217
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/gitbook/guide/workers/pausing-queues.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Pausing queues

BullMQ supports pausing queues globally or locally. A queue is paused globally when no workers will pick up any jobs from the queue. When you pause a queue, the workers that are currently busy processing a job, will continue working on that job until it completes \(or failed\), and then will just keep idling until the queue has been unpaused.
BullMQ supports pausing queues globally or locally. A queue is paused globally when no workers will pick up any jobs from the queue. When you pause a queue, the workers that are currently busy processing a job, will continue working on that job until it completes (or failed), and then will just keep idling until the queue has been unpaused.

Pausing a queue is performed by calling the _**pause**_ method on a [queue](https://github.com/taskforcesh/bullmq/blob/master/docs/gitbook/api/bullmq.queue.md) instance:
Pausing a queue is performed by calling the _**pause**_ method on a [queue](../../api/bullmq.queue.md) instance:

```typescript
await myQueue.pause();
Expand All @@ -16,9 +16,7 @@ await myWorker.pause();

The call above will wait for all the jobs currently being processed by this worker, if you do not want to wait for current jobs to complete before the call completes you can pass "true" to just pause the worker ignoring any running jobs:

```
```typescript
await myWorker.pause(true);
```



0 comments on commit d196217

Please sign in to comment.