From 5175e6eeb7ffda30d752ae1aceb2623c2bc76218 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Thu, 19 Sep 2024 19:41:19 +0530 Subject: [PATCH] feat: call processGoogleSheetUpdates() --- server/src/workflow-management/scheduler/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/src/workflow-management/scheduler/index.ts b/server/src/workflow-management/scheduler/index.ts index 9b05ddae..2bd8d8cf 100644 --- a/server/src/workflow-management/scheduler/index.ts +++ b/server/src/workflow-management/scheduler/index.ts @@ -8,6 +8,7 @@ import { readFile, saveFile } from "../storage"; import { createRemoteBrowserForRun, destroyRemoteBrowser } from '../../browser-management/controller'; import logger from '../../logger'; import { browserPool } from "../../server"; +import { googleSheetUpdateTasks, processGoogleSheetUpdates } from "../integrations/gsheet"; const connection = new IORedis({ host: 'localhost', @@ -153,7 +154,13 @@ async function executeRun(fileName: string, runId: string) { `../storage/runs/${fileName}_${runId}.json`, JSON.stringify(updated_run_meta, null, 2) ); - + googleSheetUpdateTasks[runId] = { + name: parsedRun.name, + runId: runId, + status: 'pending', + retries: 5, + }; + processGoogleSheetUpdates(); return true; } catch (error: any) { logger.log('info', `Error while running a recording with name: ${fileName}_${runId}.json`);