mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 04:47:29 -08:00
'order' result when using maxResults
This commit is contained in:
parent
8ab4f1d5ef
commit
6df5d285a8
|
@ -49,7 +49,8 @@ export class WorkflowRepository extends Repository<WorkflowEntity> {
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -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 }),
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue