mirror of
https://github.com/n8n-io/n8n.git
synced 2024-09-20 14:57:31 -07:00
refactor(core): Rename usage metrics method per suggestion (no-changelog) (#9810)
This commit is contained in:
parent
c0a6acaef6
commit
283d1ca583
|
@ -85,7 +85,7 @@ export class License {
|
||||||
? async () => await this.usageMetricsService.collectUsageMetrics()
|
? async () => await this.usageMetricsService.collectUsageMetrics()
|
||||||
: async () => [];
|
: async () => [];
|
||||||
const collectPassthroughData = isMainInstance
|
const collectPassthroughData = isMainInstance
|
||||||
? async () => await this.usageMetricsService.getActiveWorkflowIds()
|
? async () => await this.usageMetricsService.collectPassthroughData()
|
||||||
: async () => ({});
|
: async () => ({});
|
||||||
|
|
||||||
const renewalEnabled = this.renewalEnabled(instanceType);
|
const renewalEnabled = this.renewalEnabled(instanceType);
|
||||||
|
|
|
@ -31,7 +31,7 @@ export class UsageMetricsService {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
async getActiveWorkflowIds() {
|
async collectPassthroughData() {
|
||||||
return {
|
return {
|
||||||
activeWorkflowIds: await this.workflowRepository.getActiveIds(),
|
activeWorkflowIds: await this.workflowRepository.getActiveIds(),
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,8 +10,8 @@ describe('UsageMetricsService', () => {
|
||||||
workflowRepository,
|
workflowRepository,
|
||||||
);
|
);
|
||||||
|
|
||||||
describe('getActiveWorkflowIds', () => {
|
describe('collectPassthroughData', () => {
|
||||||
test('should return active workflow IDs', async () => {
|
test('should return an object with active workflow IDs', async () => {
|
||||||
/**
|
/**
|
||||||
* Arrange
|
* Arrange
|
||||||
*/
|
*/
|
||||||
|
@ -21,7 +21,7 @@ describe('UsageMetricsService', () => {
|
||||||
/**
|
/**
|
||||||
* Act
|
* Act
|
||||||
*/
|
*/
|
||||||
const result = await usageMetricsService.getActiveWorkflowIds();
|
const result = await usageMetricsService.collectPassthroughData();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assert
|
* Assert
|
||||||
|
|
Loading…
Reference in a new issue