From b7aa8f59d3d76cf89fc753f318ce10b809dcb20a Mon Sep 17 00:00:00 2001 From: Naftoli Gugenheim <98384+nafg@users.noreply.github.com> Date: Thu, 28 Mar 2024 18:31:29 -0400 Subject: [PATCH] Allow overriding MAX_PARALLEL_REQUESTS_PER_DOC from env --- app/server/lib/DocApi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/server/lib/DocApi.ts b/app/server/lib/DocApi.ts index 350fc8a4..b1683a71 100644 --- a/app/server/lib/DocApi.ts +++ b/app/server/lib/DocApi.ts @@ -98,7 +98,7 @@ import { Document } from "app/gen-server/entity/Document"; // Cap on the number of requests that can be outstanding on a single document via the // rest doc api. When this limit is exceeded, incoming requests receive an immediate // reply with status 429. -const MAX_PARALLEL_REQUESTS_PER_DOC = 10; +const MAX_PARALLEL_REQUESTS_PER_DOC = process.env.MAX_PARALLEL_REQUESTS_PER_DOC || 10; // This is NOT the number of docs that can be handled at a time. // It's a very generous upper bound of what that number might be.