From d61d563f48c06c889bef23021ab0295704ca1f50 Mon Sep 17 00:00:00 2001 From: Danny Martini Date: Thu, 12 Sep 2024 15:40:58 +0200 Subject: [PATCH] take shutdown and worfklow timeouts into account --- packages/cli/src/active-executions.ts | 2 +- packages/cli/src/workflow-runner.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/active-executions.ts b/packages/cli/src/active-executions.ts index a1fac694d2..91abc93043 100644 --- a/packages/cli/src/active-executions.ts +++ b/packages/cli/src/active-executions.ts @@ -252,7 +252,7 @@ export class ActiveExecutions { await this.concurrencyControl.removeAll(this.activeExecutions); } - executionIds.forEach((executionId) => this.stopExecution(executionId)); + executionIds.forEach((executionId) => this.cancelExecution(executionId)); } let count = 0; diff --git a/packages/cli/src/workflow-runner.ts b/packages/cli/src/workflow-runner.ts index 5a37261500..49c0710522 100644 --- a/packages/cli/src/workflow-runner.ts +++ b/packages/cli/src/workflow-runner.ts @@ -311,7 +311,7 @@ export class WorkflowRunner { if (workflowTimeout > 0) { const timeout = Math.min(workflowTimeout, config.getEnv('executions.maxTimeout')) * 1000; // as seconds executionTimeout = setTimeout(() => { - void this.activeExecutions.stopExecution(executionId); + void this.activeExecutions.cancelExecution(executionId); }, timeout); }