mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
Simplify
This commit is contained in:
parent
a224ab8c18
commit
db6fb92462
|
@ -200,13 +200,9 @@ export class Start extends BaseCommand {
|
||||||
|
|
||||||
await this.license.enableRenewal();
|
await this.license.enableRenewal();
|
||||||
|
|
||||||
if (this.globalConfig.multiMainSetup.enabled) {
|
if (this.globalConfig.multiMainSetup.enabled && !this.license.isMultiMainLicensed()) {
|
||||||
if (this.globalConfig.license.autoRenewalEnabled) await this.license.renew();
|
|
||||||
|
|
||||||
if (!this.license.isMultiMainLicensed()) {
|
|
||||||
throw new FeatureNotLicensedError(LICENSE_FEATURES.MULTIPLE_MAIN_INSTANCES);
|
throw new FeatureNotLicensedError(LICENSE_FEATURES.MULTIPLE_MAIN_INSTANCES);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Container.get(WaitTracker).init();
|
Container.get(WaitTracker).init();
|
||||||
this.logger.debug('Wait tracker init complete');
|
this.logger.debug('Wait tracker init complete');
|
||||||
|
|
|
@ -40,7 +40,10 @@ export class License {
|
||||||
this.logger = this.logger.scoped('license');
|
this.logger = this.logger.scoped('license');
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set whether this instance should renew the license. */
|
/**
|
||||||
|
* Set whether this instance should renew the license periodically. If true,
|
||||||
|
* the manager will also renew the license immediately once.
|
||||||
|
*/
|
||||||
async enableRenewal() {
|
async enableRenewal() {
|
||||||
if (!this.manager || this.instanceSettings.instanceType !== 'main') return;
|
if (!this.manager || this.instanceSettings.instanceType !== 'main') return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue