mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
Simplify
This commit is contained in:
parent
a224ab8c18
commit
db6fb92462
|
@ -200,12 +200,8 @@ export class Start extends BaseCommand {
|
|||
|
||||
await this.license.enableRenewal();
|
||||
|
||||
if (this.globalConfig.multiMainSetup.enabled) {
|
||||
if (this.globalConfig.license.autoRenewalEnabled) await this.license.renew();
|
||||
|
||||
if (!this.license.isMultiMainLicensed()) {
|
||||
throw new FeatureNotLicensedError(LICENSE_FEATURES.MULTIPLE_MAIN_INSTANCES);
|
||||
}
|
||||
if (this.globalConfig.multiMainSetup.enabled && !this.license.isMultiMainLicensed()) {
|
||||
throw new FeatureNotLicensedError(LICENSE_FEATURES.MULTIPLE_MAIN_INSTANCES);
|
||||
}
|
||||
|
||||
Container.get(WaitTracker).init();
|
||||
|
|
|
@ -40,7 +40,10 @@ export class 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() {
|
||||
if (!this.manager || this.instanceSettings.instanceType !== 'main') return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue