Skip to content

Commit

Permalink
docs(groups): add warning when local concurrency is set (#2762)
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf authored Sep 13, 2024
1 parent ce1b22e commit f6546fb
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 also set the [Group Concurrency](concurrency.md) at the worker instance level along side with the desired local concurrency, as it is required for this feature to function properly and also will act as a default concurrency value for the groups that have no local concurrency defined.
{% endhint %}

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

```typescript
Expand Down

0 comments on commit f6546fb

Please sign in to comment.