Override concurrency limits

Override the concurrency limits on a queue from the API or the dashboard.

Eric Allam

Eric Allam

CTO, Trigger.dev

James Ritchie

James Ritchie

Co-founder, Trigger.dev

Image for Override concurrency limits

You can now override the concurrency limits on a queue from the API or the dashboard. This is useful if you need to temporarily increase the concurrency for a queue or update the concurrency limits programmatically.

From your task code

You can override the concurrency limits on a queue by using the queues.overrideConcurrencyLimit and queues.resetConcurrencyLimit functions.


import { queues } from "@trigger.dev/sdk";
export async function overrideQueueConcurrency() {
// Override the concurrency limit to 10
const overriddenQueue = await queues.overrideConcurrencyLimit(
{
type: "task",
name: "queues-tester",
},
10
);
// Reset the concurrency limit back to default
const resetQueue = await queues.resetConcurrencyLimit({
type: "task",
name: "queues-tester",
});
return { overriddenQueue, resetQueue };
}

From the dashboard

You can override the concurrency limits on a queue by using the "Override limit" menu item from an individual queue on the Queues page.

Override concurrency limits

Set your concurrency limit and click "Override limit". You can always reset it back to the value set in your code or the environment limit.

Override concurrency limits

Ready to start building?

Build and deploy your first task in 3 minutes.

Get started now