|
|
|
|
@ -2937,6 +2937,7 @@ exports.motorAction = async (req, reply) => {
|
|
|
|
|
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() });
|
|
|
|
|
const currentWaterLevel = parseInt(supplierTank.waterlevel, 10);
|
|
|
|
|
|