chore: lint

This commit is contained in:
karishmas6
2024-10-26 00:55:20 +05:30
parent d30f3bf1f8
commit 29f0affa10

View File

@@ -33,21 +33,21 @@ const worker = new Worker('workflow', async job => {
worker.on('completed', async (job: any) => { worker.on('completed', async (job: any) => {
logger.log(`info`, `Job ${job.id} completed for ${job.data.runId}`); logger.log(`info`, `Job ${job.id} completed for ${job.data.runId}`);
const robot = await Robot.findOne({ where: { 'recording_meta.id': job.data.id } }); const robot = await Robot.findOne({ where: { 'recording_meta.id': job.data.id } });
if (robot) { if (robot) {
// Update `lastRunAt` to the current time // Update `lastRunAt` to the current time
const lastRunAt = new Date(); const lastRunAt = new Date();
// Compute the next run date // Compute the next run date
const nextRunAt = computeNextRun(robot.schedule.cronExpression, robot.schedule.timezone); const nextRunAt = computeNextRun(robot.schedule.cronExpression, robot.schedule.timezone);
await robot.update({ await robot.update({
schedule: { schedule: {
...robot.schedule, ...robot.schedule,
lastRunAt, lastRunAt,
nextRunAt, nextRunAt,
}, },
}); });
} }
}); });
}); });