From 29f0affa10944f9d6377b815a5a366585fc5978f Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 26 Oct 2024 00:55:20 +0530 Subject: [PATCH] chore: lint --- server/src/worker.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/server/src/worker.ts b/server/src/worker.ts index 96fded7b..0342d093 100644 --- a/server/src/worker.ts +++ b/server/src/worker.ts @@ -33,21 +33,21 @@ const worker = new Worker('workflow', async job => { worker.on('completed', async (job: any) => { logger.log(`info`, `Job ${job.id} completed for ${job.data.runId}`); const robot = await Robot.findOne({ where: { 'recording_meta.id': job.data.id } }); - if (robot) { - // Update `lastRunAt` to the current time - const lastRunAt = new Date(); + if (robot) { + // Update `lastRunAt` to the current time + const lastRunAt = new Date(); - // Compute the next run date - const nextRunAt = computeNextRun(robot.schedule.cronExpression, robot.schedule.timezone); + // Compute the next run date + const nextRunAt = computeNextRun(robot.schedule.cronExpression, robot.schedule.timezone); - await robot.update({ - schedule: { - ...robot.schedule, - lastRunAt, - nextRunAt, - }, - }); - } + await robot.update({ + schedule: { + ...robot.schedule, + lastRunAt, + nextRunAt, + }, + }); + } }); });