From 9f1702058280899af4b4df6e6cc8d1469124158e Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 27 Apr 2026 17:22:58 +0800 Subject: [PATCH] Allow canvas image queue concurrency up to 100 --- lib/canvas/image-task-queue.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/canvas/image-task-queue.ts b/lib/canvas/image-task-queue.ts index 51c7988d6..801979065 100644 --- a/lib/canvas/image-task-queue.ts +++ b/lib/canvas/image-task-queue.ts @@ -19,13 +19,14 @@ interface QueueState { } const DEFAULT_CONCURRENCY = 1; +const MAX_CONCURRENCY = 100; const STALE_RUNNING_MS = 5 * 60 * 1000; const queueStateKey = "__canvas_image_task_queue_state__"; function getQueueConcurrency(): number { const raw = Number.parseInt(process.env.CANVAS_IMAGE_TASK_CONCURRENCY || "", 10); if (Number.isFinite(raw) && raw > 0) { - return Math.min(raw, 4); + return Math.min(raw, MAX_CONCURRENCY); } return DEFAULT_CONCURRENCY; }