From 53cab16a2fd1257cc132dc8a919e08d22332cca5 Mon Sep 17 00:00:00 2001 From: kavehjamshidi Date: Mon, 7 Apr 2025 16:19:19 +0330 Subject: [PATCH] bug fix --- controller/index.js | 2 +- services/operation.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/controller/index.js b/controller/index.js index a28a444..9b409af 100644 --- a/controller/index.js +++ b/controller/index.js @@ -8,7 +8,7 @@ export default function (fastify, opts, done) { await operation.sanaEnter(fastify.req, fastify.reply) }); - cron.schedule(`00 00 16 * * *`, async () => { + cron.schedule(`00 20 16 * * *`, async () => { await operation.sanaExit(fastify.req, fastify.reply) }); diff --git a/services/operation.js b/services/operation.js index 428d21d..4e1d622 100644 --- a/services/operation.js +++ b/services/operation.js @@ -33,6 +33,8 @@ export default class Operation { ) return {} + console.log('$$$$$$$$$$$') + await async.each(this.usersList, async ({nationalId ,password}, cb) => { sleep(Math.floor(Math.random() * 100 / 2) * 60 * 1000) .then(async _ => { @@ -56,6 +58,7 @@ export default class Operation { await async.each(this.usersList, async ({nationalId ,password}, cb) => { const timer = Math.floor(Math.random() * 100 / 2) * 60 * 1000 + console.log('%%%%%%%%%%%') console.log('$$$$$$$$$$$', timer) sleep(timer) .then(async _ => {