Skip to content

Commit 0c23bbe

Browse files
authored
Simplified multi-queue docs
1 parent 7998d68 commit 0c23bbe

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

docs/queue-concurrency.mdx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -168,20 +168,14 @@ export const perUserQueue = queue({
168168
name: "per-user-queue",
169169
//each user runs at most 1 at a time...
170170
concurrencyLimit: 1,
171-
//...and at most 10 users can be running at once
171+
//...and at most 10 total runs across all users
172172
combinedConcurrencyLimit: 10,
173173
});
174174
```
175175

176176
The combined limit only applies to runs triggered with a `concurrencyKey`; runs without a key are governed by `concurrencyLimit` alone. On the Queues page in the dashboard, a queue with a combined limit shows it in brackets next to the per-key limit, e.g. `1 (10)`.
177177

178-
<Note>
179-
If you self-host, combined limits are enforced by default and can be disabled with
180-
`RUN_ENGINE_TOTAL_CONCURRENCY_LIMITS_ENABLED=0`. When enforcement is disabled the limit is
181-
still accepted, stored, and shown, but runs are not held back by it.
182-
</Note>
183-
184-
## Holding slots in more than one queue (queue gates)
178+
## Using multiple queues at once
185179

186180
Sometimes one limit isn't enough: each tenant's webhook processing should be capped, but the tenant should also have a global cap across every task they run. Queue gates let a run hold a concurrency slot in more than one queue at once.
187181

@@ -236,12 +230,6 @@ await processWebhook.trigger(payload, {
236230

237231
A run starts only when its home queue and every gate all have capacity, and it releases all of its slots together when it finishes or suspends.
238232

239-
<Note>
240-
Queue gates are enforced when the server has them enabled. If you self-host, set
241-
`RUN_ENGINE_QUEUE_GATES_ENABLED=1`; servers without gates enabled accept the option but run
242-
without it.
243-
</Note>
244-
245233
## Concurrency and subtasks
246234

247235
When you trigger a task that has subtasks, the subtasks will not inherit the queue from the parent task. Unless otherwise specified, subtasks will run on their own queue

0 commit comments

Comments
 (0)