From f3af35dffead30d4ae814b5831db14d183988aaf Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 17 May 2026 08:07:54 +0000 Subject: [PATCH] fix: lighten code queue startup task load --- src/components/microservices/code-queue/src/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/microservices/code-queue/src/index.ts b/src/components/microservices/code-queue/src/index.ts index c270a997..0f826d69 100644 --- a/src/components/microservices/code-queue/src/index.ts +++ b/src/components/microservices/code-queue/src/index.ts @@ -1600,6 +1600,14 @@ async function runDatabaseClaimMoveSelfTest(): Promise { } async function loadPrunedDatabaseTaskRows(where: "all" | "hot"): Promise { + if (where === "hot") { + return await sql` + SELECT id, updated_at, status, read_at, task_json - 'output' - 'events' AS task_json + FROM unidesk_code_queue_tasks + WHERE status IN ('queued', 'running', 'judging', 'retry_wait') + ORDER BY created_at ASC, id ASC + `; + } return await sql` SELECT id, updated_at, status, read_at, task_json FROM (