mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
refactor(core): Rename usage metrics method per suggestion (no-changelog) (#9810)
This commit is contained in:
@@ -85,7 +85,7 @@ export class License {
|
||||
? async () => await this.usageMetricsService.collectUsageMetrics()
|
||||
: async () => [];
|
||||
const collectPassthroughData = isMainInstance
|
||||
? async () => await this.usageMetricsService.getActiveWorkflowIds()
|
||||
? async () => await this.usageMetricsService.collectPassthroughData()
|
||||
: async () => ({});
|
||||
|
||||
const renewalEnabled = this.renewalEnabled(instanceType);
|
||||
|
||||
@@ -31,7 +31,7 @@ export class UsageMetricsService {
|
||||
];
|
||||
}
|
||||
|
||||
async getActiveWorkflowIds() {
|
||||
async collectPassthroughData() {
|
||||
return {
|
||||
activeWorkflowIds: await this.workflowRepository.getActiveIds(),
|
||||
};
|
||||
|
||||
@@ -10,8 +10,8 @@ describe('UsageMetricsService', () => {
|
||||
workflowRepository,
|
||||
);
|
||||
|
||||
describe('getActiveWorkflowIds', () => {
|
||||
test('should return active workflow IDs', async () => {
|
||||
describe('collectPassthroughData', () => {
|
||||
test('should return an object with active workflow IDs', async () => {
|
||||
/**
|
||||
* Arrange
|
||||
*/
|
||||
@@ -21,7 +21,7 @@ describe('UsageMetricsService', () => {
|
||||
/**
|
||||
* Act
|
||||
*/
|
||||
const result = await usageMetricsService.getActiveWorkflowIds();
|
||||
const result = await usageMetricsService.collectPassthroughData();
|
||||
|
||||
/**
|
||||
* Assert
|
||||
|
||||
Reference in New Issue
Block a user