mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08: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:
parent
c7b1920943
commit
13ef3c1d20
|
@ -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]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue