mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Simplify license autorenewal on leadership transition (#13503)
This commit is contained in:
@@ -263,11 +263,11 @@ export class Start extends BaseCommand {
|
||||
|
||||
orchestrationService.multiMainSetup
|
||||
.on('leader-stepdown', async () => {
|
||||
await this.license.reinit(); // to disable renewal
|
||||
this.license.disableAutoRenewals();
|
||||
await this.activeWorkflowManager.removeAllTriggerAndPollerBasedWorkflows();
|
||||
})
|
||||
.on('leader-takeover', async () => {
|
||||
await this.license.reinit(); // to enable renewal
|
||||
this.license.enableAutoRenewals();
|
||||
await this.activeWorkflowManager.addAllTriggerAndPollerBasedWorkflows();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user