Stop requesting all workflowRun columns to fix out of memory issue (#13241)

Querying only useful columns in enqueue cron job
This commit is contained in:
martmull
2025-07-16 17:23:21 +02:00
committed by GitHub
parent 1fc087aeac
commit 7fde4944d8

View File

@ -76,7 +76,7 @@ export class WorkflowRunEnqueueJob {
// Using raw query to avoid storing repository in cache
const workflowRuns = await mainDataSource.query(
`SELECT * FROM ${schemaName}."workflowRun" WHERE status = '${WorkflowRunStatus.NOT_STARTED}' ORDER BY "createdAt" ASC`,
`SELECT id FROM ${schemaName}."workflowRun" WHERE status = '${WorkflowRunStatus.NOT_STARTED}' ORDER BY "createdAt" ASC`,
);
const workflowRunsToEnqueueCount = Math.min(