🐛 Fix issues with subworkflows not finishing (#1553)

This commit is contained in:
Omar Ajoue 2021-03-18 23:24:57 +01:00 committed by GitHub
parent 575a2502b0
commit b879755f0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -121,7 +121,15 @@ export class WorkflowRunnerProcess {
resolve(executionId); resolve(executionId);
}; };
}); });
const result: IRun = await executeWorkflowFunction(workflowInfo, additionalData, inputData, executionId, workflowData, runData); let result: IRun;
try {
result = await executeWorkflowFunction(workflowInfo, additionalData, inputData, executionId, workflowData, runData);
} catch (e) {
await sendToParentProcess('finishExecution', { executionId });
// Throw same error we had
throw e;
}
await sendToParentProcess('finishExecution', { executionId, result }); await sendToParentProcess('finishExecution', { executionId, result });
const returnData = WorkflowHelpers.getDataLastExecutedNodeData(result); const returnData = WorkflowHelpers.getDataLastExecutedNodeData(result);