fix(core): Start WaitTracker only in the main container (#9600)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-06-03 17:43:24 +02:00
committed by GitHub
parent d6db8cbf23
commit 08d9c9a787
3 changed files with 36 additions and 45 deletions

View File

@@ -27,9 +27,11 @@ export class WaitTracker {
private readonly executionRepository: ExecutionRepository,
private readonly ownershipService: OwnershipService,
private readonly workflowRunner: WorkflowRunner,
readonly orchestrationService: OrchestrationService,
) {
const { isSingleMainSetup, isLeader, multiMainSetup } = orchestrationService;
private readonly orchestrationService: OrchestrationService,
) {}
init() {
const { isSingleMainSetup, isLeader, multiMainSetup } = this.orchestrationService;
if (isSingleMainSetup) {
this.startTracking();
@@ -43,7 +45,7 @@ export class WaitTracker {
.on('leader-stepdown', () => this.stopTracking());
}
startTracking() {
private startTracking() {
this.logger.debug('Wait tracker started tracking waiting executions');
// Poll every 60 seconds a list of upcoming executions

View File

@@ -178,6 +178,8 @@ export class Start extends BaseCommand {
await this.initOrchestration();
this.logger.debug('Orchestration init complete');
Container.get(WaitTracker).init();
this.logger.debug('Wait tracker init complete');
await this.initBinaryDataService();
this.logger.debug('Binary data service init complete');
await this.initExternalHooks();