mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Make Logger a service (no-changelog) (#7494)
This commit is contained in:
committed by
GitHub
parent
db4e61ba24
commit
05586a900d
@@ -1,7 +1,8 @@
|
||||
import type { TEntitlement, TFeatures, TLicenseBlock } from '@n8n_io/license-sdk';
|
||||
import { LicenseManager } from '@n8n_io/license-sdk';
|
||||
import type { ILogger } from 'n8n-workflow';
|
||||
import { getLogger } from './Logger';
|
||||
import { InstanceSettings, ObjectStoreService } from 'n8n-core';
|
||||
import Container, { Service } from 'typedi';
|
||||
import { Logger } from '@/Logger';
|
||||
import config from '@/config';
|
||||
import * as Db from '@/Db';
|
||||
import {
|
||||
@@ -11,12 +12,10 @@ import {
|
||||
SETTINGS_LICENSE_CERT_KEY,
|
||||
UNLIMITED_LICENSE_QUOTA,
|
||||
} from './constants';
|
||||
import Container, { Service } from 'typedi';
|
||||
import { WorkflowRepository } from '@/databases/repositories';
|
||||
import type { BooleanLicenseFeature, N8nInstanceType, NumericLicenseFeature } from './Interfaces';
|
||||
import type { RedisServicePubSubPublisher } from './services/redis/RedisServicePubSubPublisher';
|
||||
import { RedisService } from './services/redis.service';
|
||||
import { InstanceSettings, ObjectStoreService } from 'n8n-core';
|
||||
|
||||
type FeatureReturnType = Partial<
|
||||
{
|
||||
@@ -26,15 +25,14 @@ type FeatureReturnType = Partial<
|
||||
|
||||
@Service()
|
||||
export class License {
|
||||
private logger: ILogger;
|
||||
|
||||
private manager: LicenseManager | undefined;
|
||||
|
||||
private redisPublisher: RedisServicePubSubPublisher;
|
||||
|
||||
constructor(private readonly instanceSettings: InstanceSettings) {
|
||||
this.logger = getLogger();
|
||||
}
|
||||
constructor(
|
||||
private readonly logger: Logger,
|
||||
private readonly instanceSettings: InstanceSettings,
|
||||
) {}
|
||||
|
||||
async init(instanceType: N8nInstanceType = 'main') {
|
||||
if (this.manager) {
|
||||
|
||||
Reference in New Issue
Block a user