commit forced manual

master^2
Bhaskar 7 months ago
parent d142d808ff
commit 7321fcd8b2

@ -6003,7 +6003,8 @@ const sendMotorNotifications = async () => {
const inputConnection = motorTank.connections.inputConnections.find( const inputConnection = motorTank.connections.inputConnections.find(
(conn) => conn.motor_id (conn) => conn.motor_id
); );
const status = inputConnection.motor_status
console.log("motorTank",inputConnection)
if (!inputConnection) continue; if (!inputConnection) continue;
const { customerId, blockName, tankName } = motorTank; const { customerId, blockName, tankName } = motorTank;
@ -6012,7 +6013,7 @@ const sendMotorNotifications = async () => {
// 🔹 Motor Start Condition // 🔹 Motor Start Condition
if ( if (
inputConnection.motor_stop_status === "2" && inputConnection.motor_stop_status === "2" && status ===1 &&
!motorTank.motor_start_notified !motorTank.motor_start_notified
) { ) {
console.log("✅ Sending Motor Start Notification..."); console.log("✅ Sending Motor Start Notification...");
@ -6067,9 +6068,9 @@ const sendMotorNotifications = async () => {
}; };
// Run the notification check every second // Run the notification check every second
cron.schedule("* * * * * *", async () => { // cron.schedule("* * * * * *", async () => {
//await sendMotorNotifications(); // // await sendMotorNotifications();
}); // });

Loading…
Cancel
Save