From fe509383f82402ed4bfda56698cba6954a3e0089 Mon Sep 17 00:00:00 2001 From: Rohit Date: Thu, 12 Jun 2025 23:46:46 +0530 Subject: [PATCH] fix: merge conflict --- server/src/routes/storage.ts | 39 +----------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/server/src/routes/storage.ts b/server/src/routes/storage.ts index 74bea6ff..06bb361f 100644 --- a/server/src/routes/storage.ts +++ b/server/src/routes/storage.ts @@ -630,44 +630,7 @@ router.put('/runs/:id', requireSignIn, async (req: AuthenticatedRequest, res) => robotMetaId: recording.recording_meta.id, queued: true }); - } else { - const browserId = getActiveBrowserIdByState(req.user.id, "run") - - if (browserId) { - // User has reached the browser limit, queue the run - try { - // Create the run record with 'queued' status - await Run.create({ - status: 'queued', - name: recording.recording_meta.name, - robotId: recording.id, - robotMetaId: recording.recording_meta.id, - startedAt: new Date().toLocaleString(), - finishedAt: '', - browserId: browserId, // Random will be updated later - interpreterSettings: req.body, - log: 'Run queued - waiting for available browser slot', - runId, - runByUserId: req.user.id, - serializableOutput: {}, - binaryOutput: {}, - }); - - return res.send({ - browserId: browserId, - runId: runId, - robotMetaId: recording.recording_meta.id, - queued: true, - }); - } catch (queueError: any) { - logger.log('error', `Failed to queue run job: ${queueError.message}`); - return res.status(503).send({ error: 'Unable to queue run, please try again later' }); - } - } else { - logger.log('info', "Browser id does not exist"); - return res.send(''); - } - } + } } catch (e) { const { message } = e as Error; logger.log('error', `Error while creating a run with robot id: ${req.params.id} - ${message}`);