Skip to content

Commit

Permalink
docs(groups): add warning when local concurrency is set
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf committed Sep 7, 2024
1 parent 3dc13d1 commit e89f0f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion docs/gitbook/bullmq-pro/groups/concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ const worker = new WorkerPro('myQueue', processFn, {
```

The concurrency factor is global, so in the example above, independently of the concurrency factor per worker or the number of workers that you instantiate in your application, it will never process more than 3 jobs per group at any given time.

4 changes: 4 additions & 0 deletions docs/gitbook/bullmq-pro/groups/local-group-concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ const groupId = 'my group';
await queue.setGroupConcurrency(groupId, 4);
```

{% hint style="warning" %}
Make sure to set [Group Concurrency](concurrency.md) at worker instance level along side with local concurrency. It will work as a default concurrency for those groups that don't have a local concurrency. In this way workers will know about this feature.
{% endhint %}

And you can use the `getGroupConcurrency` method like this:

```typescript
Expand Down

0 comments on commit e89f0f8

Please sign in to comment.