mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(core): Add instanceId to n8n.ready hook (no-changelog) (#6007)
* add instanceId to n8n.ready hook * Set instanceId during configuration method
This commit is contained in:
@@ -55,6 +55,8 @@ export abstract class AbstractServer {
|
||||
|
||||
protected endpointWebhookWaiting: string;
|
||||
|
||||
protected instanceId = '';
|
||||
|
||||
abstract configure(): Promise<void>;
|
||||
|
||||
constructor() {
|
||||
|
||||
@@ -444,13 +444,15 @@ class Server extends AbstractServer {
|
||||
async configure(): Promise<void> {
|
||||
configureMetrics(this.app);
|
||||
|
||||
this.instanceId = await UserSettings.getInstanceId();
|
||||
|
||||
this.frontendSettings.isNpmAvailable = await exec('npm --version')
|
||||
.then(() => true)
|
||||
.catch(() => false);
|
||||
|
||||
this.frontendSettings.versionCli = N8N_VERSION;
|
||||
|
||||
this.frontendSettings.instanceId = await UserSettings.getInstanceId();
|
||||
this.frontendSettings.instanceId = this.instanceId;
|
||||
|
||||
await this.externalHooks.run('frontend.settings', [this.frontendSettings]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user