From fb9f614d9c87dc050a7446ebaeb0645b6c98ef46 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Fri, 18 Oct 2024 00:05:56 +0530 Subject: [PATCH] feat: use plainRun.robotMetaId --- server/src/routes/storage.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/server/src/routes/storage.ts b/server/src/routes/storage.ts index 675fec7f..ada5acdd 100644 --- a/server/src/routes/storage.ts +++ b/server/src/routes/storage.ts @@ -219,13 +219,17 @@ router.post('/runs/run/:id', requireSignIn, async (req, res) => { serializableOutput: interpretationInfo.serializableOutput, binaryOutput: uploadedBinaryOutput, }); - googleSheetUpdateTasks[req.params.id] = { - name: plainRun.name, - runId: plainRun.runId, - status: 'pending', - retries: 5, - }; - processGoogleSheetUpdates(); + try { + googleSheetUpdateTasks[plainRun.runId] = { + robotId: plainRun.robotMetaId, + runId: plainRun.runId, + status: 'pending', + retries: 5, + }; + processGoogleSheetUpdates(); + } catch (err: any) { + logger.log('error', `Failed to update Google Sheet for run: ${plainRun.runId}: ${err.message}`); + } return res.send(true); } else { throw new Error('Could not destroy browser');