fix(CQ-ORCH-10): Make BullMQ job retention configurable via env vars
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Replace hardcoded BullMQ job retention values (completed: 100 jobs / 1h, failed: 1000 jobs / 24h) with configurable env vars to prevent memory growth under load. Adds QUEUE_COMPLETED_RETENTION_COUNT, QUEUE_COMPLETED_RETENTION_AGE_S, QUEUE_FAILED_RETENTION_COUNT, and QUEUE_FAILED_RETENTION_AGE_S to orchestrator config. Defaults preserve existing behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -43,4 +43,13 @@ export const orchestratorConfig = registerAs("orchestrator", () => ({
|
||||
spawner: {
|
||||
maxConcurrentAgents: parseInt(process.env.MAX_CONCURRENT_AGENTS ?? "20", 10),
|
||||
},
|
||||
queue: {
|
||||
completedRetentionCount: parseInt(process.env.QUEUE_COMPLETED_RETENTION_COUNT ?? "100", 10),
|
||||
completedRetentionAgeSeconds: parseInt(
|
||||
process.env.QUEUE_COMPLETED_RETENTION_AGE_S ?? "3600",
|
||||
10
|
||||
),
|
||||
failedRetentionCount: parseInt(process.env.QUEUE_FAILED_RETENTION_COUNT ?? "1000", 10),
|
||||
failedRetentionAgeSeconds: parseInt(process.env.QUEUE_FAILED_RETENTION_AGE_S ?? "86400", 10),
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user