This commit is contained in:
Iván Ovejero 2025-01-03 12:04:45 +01:00
parent a224ab8c18
commit db6fb92462
No known key found for this signature in database
2 changed files with 6 additions and 7 deletions

View file

@ -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();

View file

@ -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;