fix: Init license properly with multi main (no-changelog) (#9467)

This commit is contained in:
Omar Ajoue 2024-05-20 13:02:08 +01:00 committed by GitHub
parent bf2ee51e36
commit 747012dcfd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -61,8 +61,8 @@ export class License {
return autoRenewEnabled; return autoRenewEnabled;
} }
async init(instanceType: N8nInstanceType = 'main') { async init(instanceType: N8nInstanceType = 'main', forceRecreate = false) {
if (this.manager) { if (this.manager && !forceRecreate) {
this.logger.warn('License manager already initialized or shutting down'); this.logger.warn('License manager already initialized or shutting down');
return; return;
} }
@ -375,6 +375,6 @@ export class License {
async reinit() { async reinit() {
this.manager?.reset(); this.manager?.reset();
await this.init(); await this.init('main', true);
} }
} }