mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +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 endpointWebhookWaiting: string;
|
||||||
|
|
||||||
|
protected instanceId = '';
|
||||||
|
|
||||||
abstract configure(): Promise<void>;
|
abstract configure(): Promise<void>;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|||||||
@@ -444,13 +444,15 @@ class Server extends AbstractServer {
|
|||||||
async configure(): Promise<void> {
|
async configure(): Promise<void> {
|
||||||
configureMetrics(this.app);
|
configureMetrics(this.app);
|
||||||
|
|
||||||
|
this.instanceId = await UserSettings.getInstanceId();
|
||||||
|
|
||||||
this.frontendSettings.isNpmAvailable = await exec('npm --version')
|
this.frontendSettings.isNpmAvailable = await exec('npm --version')
|
||||||
.then(() => true)
|
.then(() => true)
|
||||||
.catch(() => false);
|
.catch(() => false);
|
||||||
|
|
||||||
this.frontendSettings.versionCli = N8N_VERSION;
|
this.frontendSettings.versionCli = N8N_VERSION;
|
||||||
|
|
||||||
this.frontendSettings.instanceId = await UserSettings.getInstanceId();
|
this.frontendSettings.instanceId = this.instanceId;
|
||||||
|
|
||||||
await this.externalHooks.run('frontend.settings', [this.frontendSettings]);
|
await this.externalHooks.run('frontend.settings', [this.frontendSettings]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user