mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-28 15:27:03 +02:00
fix(core): License should ignore empty input on onFeatureChange (#13912)
This commit is contained in:
parent
31493a0cac
commit
dedcdbd314
|
|
@ -131,11 +131,18 @@ export class License {
|
|||
}
|
||||
|
||||
async onFeatureChange(_features: TFeatures): Promise<void> {
|
||||
const { isMultiMain, isLeader } = this.instanceSettings;
|
||||
|
||||
if (Object.keys(_features).length === 0) {
|
||||
this.logger.error('Empty license features recieved', { isMultiMain, isLeader });
|
||||
return;
|
||||
}
|
||||
|
||||
this.logger.debug('License feature change detected', _features);
|
||||
|
||||
this.checkIsLicensedForMultiMain(_features);
|
||||
|
||||
if (this.instanceSettings.isMultiMain && !this.instanceSettings.isLeader) {
|
||||
if (isMultiMain && !isLeader) {
|
||||
this.logger
|
||||
.scoped(['scaling', 'multi-main-setup', 'license'])
|
||||
.debug('Instance is not leader, skipping sending of "reload-license" command...');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user