From 7321fcd8b2756dc99a19b5b139153554e10c7941 Mon Sep 17 00:00:00 2001 From: Bhaskar Date: Thu, 6 Mar 2025 17:19:07 +0530 Subject: [PATCH] commit forced manual --- src/controllers/tanksController.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 62f07de5..d202b6c2 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -6003,7 +6003,8 @@ const sendMotorNotifications = async () => { const inputConnection = motorTank.connections.inputConnections.find( (conn) => conn.motor_id ); - + const status = inputConnection.motor_status + console.log("motorTank",inputConnection) if (!inputConnection) continue; const { customerId, blockName, tankName } = motorTank; @@ -6012,7 +6013,7 @@ const sendMotorNotifications = async () => { // 🔹 Motor Start Condition if ( - inputConnection.motor_stop_status === "2" && + inputConnection.motor_stop_status === "2" && status ===1 && !motorTank.motor_start_notified ) { console.log("✅ Sending Motor Start Notification..."); @@ -6067,9 +6068,9 @@ const sendMotorNotifications = async () => { }; // Run the notification check every second - cron.schedule("* * * * * *", async () => { - //await sendMotorNotifications(); - }); +// cron.schedule("* * * * * *", async () => { +// // await sendMotorNotifications(); +// });