feat: log robot scheduled run error

This commit is contained in:
karishmas6
2024-11-29 22:13:45 +05:30
parent 5ff6dcddc1
commit 3f5c30bae9

View File

@@ -171,7 +171,7 @@ async function executeRun(id: string) {
processGoogleSheetUpdates(); processGoogleSheetUpdates();
return true; return true;
} catch (error: any) { } catch (error: any) {
logger.log('info', `Error while running a recording with id: ${id} - ${error.message}`); logger.log('info', `Error while running a robot with id: ${id} - ${error.message}`);
console.log(error.message); console.log(error.message);
const run = await Run.findOne({ where: { runId: id } }); const run = await Run.findOne({ where: { runId: id } });
if (run) { if (run) {
@@ -232,7 +232,7 @@ export async function handleRunRecording(id: string, userId: string) {
socket.on('ready-for-run', () => readyForRunHandler(browserId, newRunId)); socket.on('ready-for-run', () => readyForRunHandler(browserId, newRunId));
logger.log('info', `Running recording: ${id}`); logger.log('info', `Running robot: ${id}`);
socket.on('disconnect', () => { socket.on('disconnect', () => {
cleanupSocketListeners(socket, browserId, newRunId); cleanupSocketListeners(socket, browserId, newRunId);