mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -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 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]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue