You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add documentation for queue management SDK functions and API
Added documentation for the previously undocumented queue management
functions in the SDK `queues` namespace:
- queues.list() - List all queues with pagination
- queues.retrieve() - Retrieve a queue by ID or type/name
- queues.pause() - Pause a queue
- queues.resume() - Resume a paused queue
- queues.overrideConcurrencyLimit() - Override concurrency limit
- queues.resetConcurrencyLimit() - Reset concurrency limit
Changes:
- Updated queue-concurrency.mdx with SDK function documentation
- Added OpenAPI endpoints for all queue management APIs
- Created API reference pages in docs/management/queues/
- Added Queues API group to docs.json navigation
Slack thread: https://triggerdotdev.slack.com/archives/C061L2MHW93/p1771450098057739https://claude.ai/code/session_01LyrXwxHCbejvi34fykifPP
When the parent task reaches the `triggerAndWait` call, it checkpoints and transitions to the `WAITING` state, releasing its concurrency slot back to both its queue and the environment. Once the subtask completes, the parent task will resume and re-acquire a concurrency slot.
229
+
230
+
## Managing queues with the SDK
231
+
232
+
The SDK provides a `queues` namespace that allows you to manage queues programmatically. You can list, retrieve, pause, resume, and modify concurrency limits for queues.
233
+
234
+
<Note>
235
+
Import from `@trigger.dev/sdk`:
236
+
```ts
237
+
import { queues } from"@trigger.dev/sdk";
238
+
```
239
+
</Note>
240
+
241
+
### Listing queues
242
+
243
+
You can list all queues in your environment with pagination support:
244
+
245
+
```ts
246
+
import { queues } from"@trigger.dev/sdk";
247
+
248
+
// List all queues (returns paginated results)
249
+
const allQueues =awaitqueues.list();
250
+
251
+
// With pagination options
252
+
const pagedQueues =awaitqueues.list({
253
+
page: 1,
254
+
perPage: 20,
255
+
});
256
+
```
257
+
258
+
### Retrieving a queue
259
+
260
+
You can retrieve a specific queue by its ID, or by its type and name:
0 commit comments