take shutdown and worfklow timeouts into account

This commit is contained in:
Danny Martini 2024-09-12 15:40:58 +02:00
parent d3b8776f20
commit d61d563f48
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

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