fix(core): Prevent occassional 429s on license init in multi-main setup (#9284)

This commit is contained in:
Iván Ovejero
2024-05-06 09:04:16 +02:00
committed by GitHub
parent bfb0eb7a06
commit 22b6f90950
5 changed files with 124 additions and 10 deletions

View File

@@ -211,9 +211,11 @@ export class Start extends BaseCommand {
orchestrationService.multiMainSetup
.on('leader-stepdown', async () => {
await this.license.reinit(); // to disable renewal
await this.activeWorkflowRunner.removeAllTriggerAndPollerBasedWorkflows();
})
.on('leader-takeover', async () => {
await this.license.reinit(); // to enable renewal
await this.activeWorkflowRunner.addAllTriggerAndPollerBasedWorkflows();
});
}