From 8b7c01a704183a5745d81baef0c354cc560f78a2 Mon Sep 17 00:00:00 2001 From: Bhaskar Date: Wed, 5 Mar 2025 12:58:58 +0530 Subject: [PATCH] chnages --- src/controllers/tanksController.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index c49cacea..27d6f5d7 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -2952,22 +2952,6 @@ exports.motorAction = async (req, reply) => { const totalWaterPumped = await calculateTotalPumpedWater(customerId, motorId, start_instance_id); - const lowWaterThreshold = 5; // Adjust as needed - const thresholdTime = new Date(manual_threshold_time); // Convert threshold time - - if (new Date() >= thresholdTime || currentWaterPercentage <= lowWaterThreshold) { - console.log("Motor stopping because it entered this condition"); - - eventEmitter.emit( - "sendThresholdTimeNotification", - customerId, - fcmToken, - manual_threshold_time, - motorId - ); - } - - console.log("Motor stopped"); eventEmitter.emit("motorStop", customerId, fcmToken, tankName, blockName, stopTime, "Mobile APP", totalWaterPumped, typeOfWater, motorId, loggedInUser.phone,);