From 17f0e29b046b98012e1d03a3691edd05eccf25e9 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Tue, 15 Oct 2024 22:22:03 +0530 Subject: [PATCH] feat: use binaryOutputService --- server/src/workflow-management/scheduler/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/workflow-management/scheduler/index.ts b/server/src/workflow-management/scheduler/index.ts index 615a43fb..bb182928 100644 --- a/server/src/workflow-management/scheduler/index.ts +++ b/server/src/workflow-management/scheduler/index.ts @@ -8,6 +8,7 @@ import { googleSheetUpdateTasks, processGoogleSheetUpdates } from "../integratio import Robot from "../../models/Robot"; import Run from "../../models/Run"; import { getDecryptedProxyConfig } from "../../routes/proxy"; +import { BinaryOutputService } from "../../storage/mino"; async function createWorkflowAndStoreMetadata(id: string, userId: string) { try { @@ -114,6 +115,9 @@ async function executeRun(id: string) { const interpretationInfo = await browser.interpreter.InterpretRecording( recording.recording, currentPage, plainRun.interpreterSettings); + + const binaryOutputService = new BinaryOutputService('maxun-run-screenshots'); + const uploadedBinaryOutput = await binaryOutputService.uploadAndStoreBinaryOutput(run, interpretationInfo.binaryOutput); await destroyRemoteBrowser(plainRun.browserId); @@ -124,7 +128,7 @@ async function executeRun(id: string) { browserId: plainRun.browserId, log: interpretationInfo.log.join('\n'), serializableOutput: interpretationInfo.serializableOutput, - binaryOutput: interpretationInfo.binaryOutput, + binaryOutput: uploadedBinaryOutput, }); googleSheetUpdateTasks[id] = {