mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix: Initialize license in queue mode correctly (#6301)
This commit is contained in:
@@ -28,7 +28,6 @@ import { EDITOR_UI_DIST_DIR, GENERATED_STATIC_DIR } from '@/constants';
|
||||
import { eventBus } from '@/eventbus';
|
||||
import { BaseCommand } from './BaseCommand';
|
||||
import { InternalHooks } from '@/InternalHooks';
|
||||
import { License } from '@/License';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
|
||||
const open = require('open');
|
||||
@@ -186,28 +185,6 @@ export class Start extends BaseCommand {
|
||||
await Promise.all(files.map(compileFile));
|
||||
}
|
||||
|
||||
async initLicense(): Promise<void> {
|
||||
const license = Container.get(License);
|
||||
await license.init(this.instanceId);
|
||||
|
||||
const activationKey = config.getEnv('license.activationKey');
|
||||
|
||||
if (activationKey) {
|
||||
const hasCert = (await license.loadCertStr()).length > 0;
|
||||
|
||||
if (hasCert) {
|
||||
return LoggerProxy.debug('Skipping license activation');
|
||||
}
|
||||
|
||||
try {
|
||||
LoggerProxy.debug('Attempting license activation');
|
||||
await license.activate(activationKey);
|
||||
} catch (e) {
|
||||
LoggerProxy.error('Could not activate license', e as Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async init() {
|
||||
await this.initCrashJournal();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user