refactor(core): Simplify license autorenewal on leadership transition (#13503)

This commit is contained in:
Iván Ovejero
2025-02-25 17:22:15 +01:00
committed by GitHub
parent b984deac3b
commit 288cce6370
3 changed files with 10 additions and 26 deletions

View File

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