mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor: Delete a lot of unused and duplicate code in Server and WebhookServer (#5080)
* store n8n version string in a const and use that everywhere * reduce code duplication between Server and WebhookServer * unify redis checks * fix linting
This commit is contained in:
committed by
GitHub
parent
b67f803cbe
commit
8b19fdd5f0
@@ -3,7 +3,7 @@ import { ILogger } from 'n8n-workflow';
|
||||
import { getLogger } from './Logger';
|
||||
import config from '@/config';
|
||||
import * as Db from '@/Db';
|
||||
import { LICENSE_FEATURES, SETTINGS_LICENSE_CERT_KEY } from './constants';
|
||||
import { LICENSE_FEATURES, N8N_VERSION, SETTINGS_LICENSE_CERT_KEY } from './constants';
|
||||
|
||||
async function loadCertStr(): Promise<TLicenseContainerStr> {
|
||||
const databaseSettings = await Db.collections.Settings.findOne({
|
||||
@@ -35,7 +35,7 @@ export class License {
|
||||
this.logger = getLogger();
|
||||
}
|
||||
|
||||
async init(instanceId: string, version: string) {
|
||||
async init(instanceId: string) {
|
||||
if (this.manager) {
|
||||
return;
|
||||
}
|
||||
@@ -48,7 +48,7 @@ export class License {
|
||||
this.manager = new LicenseManager({
|
||||
server,
|
||||
tenantId: config.getEnv('license.tenantId'),
|
||||
productIdentifier: `n8n-${version}`,
|
||||
productIdentifier: `n8n-${N8N_VERSION}`,
|
||||
autoRenewEnabled,
|
||||
autoRenewOffset,
|
||||
logger: this.logger,
|
||||
|
||||
Reference in New Issue
Block a user