fix(core): Fix canceled execution status (#6142)

This commit is contained in:
Michael Auerswald
2023-05-02 10:37:35 +02:00
committed by GitHub
parent 06fa6f1fb3
commit 839a56a682
4 changed files with 20 additions and 3 deletions

View File

@@ -1286,12 +1286,16 @@ export class WorkflowExecute {
message: executionError.message,
stack: executionError.stack,
} as ExecutionError;
if (executionError.message?.includes('canceled')) {
fullRunData.status = 'canceled';
}
} else if (this.runExecutionData.waitTill!) {
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
Logger.verbose(`Workflow execution will wait until ${this.runExecutionData.waitTill}`, {
workflowId: workflow.id,
});
fullRunData.waitTill = this.runExecutionData.waitTill;
fullRunData.status = 'waiting';
} else {
Logger.verbose('Workflow execution finished successfully', { workflowId: workflow.id });
fullRunData.finished = true;
@@ -1304,7 +1308,6 @@ export class WorkflowExecute {
// Static data of workflow changed
newStaticData = workflow.staticData;
}
await this.executeHook('workflowExecuteAfter', [fullRunData, newStaticData]);
if (closeFunction) {