feat: call processGoogleSheetUpdates()

This commit is contained in:
karishmas6
2024-09-19 19:41:19 +05:30
parent dcd3b7c2ff
commit 5175e6eeb7

View File

@@ -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`);