mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(core): Add support for floating licenses (#7090)
This PR updates the license-sdk to v2.5.0 which introduces optional support for floating licenses.
This commit is contained in:
committed by
GitHub
parent
fd78021b68
commit
e26553f198
@@ -28,6 +28,7 @@ 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');
|
||||
@@ -98,6 +99,10 @@ export class Start extends BaseCommand {
|
||||
await this.exitSuccessFully();
|
||||
}, 30000);
|
||||
|
||||
// Shut down License manager to unclaim any floating entitlements
|
||||
// Note: While this saves a new license cert to DB, the previous entitlements are still kept in memory so that the shutdown process can complete
|
||||
await Container.get(License).shutdown();
|
||||
|
||||
await Container.get(InternalHooks).onN8nStop();
|
||||
|
||||
const skipWebhookDeregistration = config.getEnv(
|
||||
@@ -133,7 +138,7 @@ export class Start extends BaseCommand {
|
||||
executingWorkflows = activeExecutionsInstance.getActiveExecutions();
|
||||
}
|
||||
|
||||
//finally shut down Event Bus
|
||||
// Finally shut down Event Bus
|
||||
await eventBus.close();
|
||||
} catch (error) {
|
||||
await this.exitWithCrash('There was an error shutting down n8n.', error);
|
||||
|
||||
Reference in New Issue
Block a user