diff --git a/packages/cli/src/databases/repositories/workflow.repository.ts b/packages/cli/src/databases/repositories/workflow.repository.ts index 7c5b76f379..393e4948c9 100644 --- a/packages/cli/src/databases/repositories/workflow.repository.ts +++ b/packages/cli/src/databases/repositories/workflow.repository.ts @@ -49,7 +49,8 @@ export class WorkflowRepository extends Repository { const activeWorkflows = await this.find({ select: ['id'], where: { active: true }, - ...(maxResults ? { take: maxResults } : {}), + // 'take' and 'order' are only needed when maxResults is provided: + ...(maxResults ? { take: maxResults, order: { createdAt: 'ASC' } } : {}), }); return activeWorkflows.map((workflow) => workflow.id); } diff --git a/packages/cli/src/metrics/license-metrics.service.ts b/packages/cli/src/metrics/license-metrics.service.ts index b0e0c8f117..b8fea3b29f 100644 --- a/packages/cli/src/metrics/license-metrics.service.ts +++ b/packages/cli/src/metrics/license-metrics.service.ts @@ -38,6 +38,7 @@ export class LicenseMetricsService { async collectPassthroughData() { return { // Get only the first 1000 active workflow IDs to avoid sending too much data to License Server + // Passthrough data is forwarded to Telemetry for further analysis, such as quota excesses activeWorkflowIds: await this.workflowRepository.getActiveIds({ maxResults: 1000 }), }; }