diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 0a7f8e5d..4dd11752 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -2936,6 +2936,7 @@ exports.motorAction = async (req, reply) => { const thresholdTime = new Date(new Date().getTime() + req.body.manual_threshold_time * 60000); console.log("New Threshold Time:", thresholdTime); console.log("Current Time:", new Date()); + motorIntervals[motorId] = setInterval(async () => { const supplierTank = await Tank.findOne({ customerId, tankName: req.body.from, tankLocation: req.body.from_type.toLowerCase() });