From 35e7778c32facfe6c538e13c6eb25fde880025f6 Mon Sep 17 00:00:00 2001 From: Rohit Date: Sun, 27 Apr 2025 15:28:50 +0530 Subject: [PATCH] feat: schedule categorize data by action type --- server/src/workflow-management/scheduler/index.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server/src/workflow-management/scheduler/index.ts b/server/src/workflow-management/scheduler/index.ts index 8267fbb8..bbf845a6 100644 --- a/server/src/workflow-management/scheduler/index.ts +++ b/server/src/workflow-management/scheduler/index.ts @@ -132,6 +132,12 @@ async function executeRun(id: string, userId: string) { const binaryOutputService = new BinaryOutputService('maxun-run-screenshots'); const uploadedBinaryOutput = await binaryOutputService.uploadAndStoreBinaryOutput(run, interpretationInfo.binaryOutput); + const categorizedOutput = { + scrapeSchema: interpretationInfo.scrapeSchemaOutput || {}, + scrapeList: interpretationInfo.scrapeListOutput || {}, + other: interpretationInfo.otherOutput || {} + }; + await destroyRemoteBrowser(plainRun.browserId, userId); await run.update({ @@ -140,7 +146,11 @@ async function executeRun(id: string, userId: string) { finishedAt: new Date().toLocaleString(), browserId: plainRun.browserId, log: interpretationInfo.log.join('\n'), - serializableOutput: interpretationInfo.serializableOutput, + serializableOutput: { + scrapeSchema: Object.values(categorizedOutput.scrapeSchema), + scrapeList: Object.values(categorizedOutput.scrapeList), + other: Object.values(categorizedOutput.other), + }, binaryOutput: uploadedBinaryOutput, });