From 342535b7e7aa99964321ebaa908046d4a1b9ca3e Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Mon, 5 May 2025 11:10:16 -0300 Subject: [PATCH] Enhance OpcManager logging for data change notifications - Added logging statements to OpcManager to track data change notifications and cycle count resets for monitored tags. - Improved traceability of events related to OPC cycles, aiding in debugging and monitoring. --- ingestor/managers/opc_manager.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ingestor/managers/opc_manager.py b/ingestor/managers/opc_manager.py index e7005bd..35da64e 100644 --- a/ingestor/managers/opc_manager.py +++ b/ingestor/managers/opc_manager.py @@ -222,6 +222,12 @@ class OpcManager(): source_timestamp = monitored_item.Value.SourceTimestamp tag = str(node) + self.logger.info( + f"Data change notification received for tag: {tag} after {self.nodes[tag]['cycle_rule']['cycle_count']} cycles") + + self.logger.info( + f"Resetting cycle count for tag: {tag} after {self.non_receive_count} OPC cycles") + self.nodes[tag]['cycle_rule']['cycle_count'] = 0 self.non_receive_count = 0