Skip to content

Commit 30590bc

Browse files
author
Roman Snapko
committed
Fix pr comments
1 parent 767606e commit 30590bc

2 files changed

Lines changed: 6 additions & 14 deletions

File tree

packages/server/api/src/app/flows/flow-run/flow-run-service.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,10 @@ export const flowRunService = {
159159
} as Record<string, StepOutput>,
160160
};
161161

162-
const serializedLogs = await logSerializer.serialize({
163-
executionState,
164-
});
165-
166-
const logsFile = await fileService.save({
167-
data: serializedLogs,
168-
type: FileType.FLOW_RUN_LOG,
169-
compression: FileCompression.GZIP,
162+
const logsFileId = await updateLogs({
163+
logsFileId: null,
170164
projectId,
165+
executionState,
171166
});
172167

173168
const failedRun = {
@@ -185,7 +180,7 @@ export const flowRunService = {
185180
tasks: 0,
186181
duration: 0,
187182
tags: [],
188-
logsFileId: logsFile.id,
183+
logsFileId,
189184
};
190185

191186
await flowRunRepo().save(failedRun);

packages/server/worker/src/lib/trigger/hooks/extract-trigger-payload-hooks.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,13 @@ function handleFailureFlow(
9898
): void {
9999
const engineController = engineApiService(engineToken);
100100

101-
let request = {
101+
const request = {
102102
flowId: flowVersion.flowId,
103103
projectId,
104104
success,
105+
...(!success && failureDetails ? failureDetails : {}),
105106
} as UpdateFailureCountRequest;
106107

107-
if (!success && failureDetails) {
108-
request = { ...request, ...failureDetails };
109-
}
110-
111108
rejectedPromiseHandler(engineController.updateFailureCount(request));
112109
}
113110

0 commit comments

Comments
 (0)