From 242ca24060200a8f37252022cc974407d37d731e Mon Sep 17 00:00:00 2001 From: ryans Date: Thu, 29 Oct 2020 10:37:14 -0400 Subject: [PATCH] Clear latest ack on new alarming instances --- scripts/client.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/client.py b/scripts/client.py index 6500493..42b3c15 100755 --- a/scripts/client.py +++ b/scripts/client.py @@ -86,6 +86,14 @@ def poll_msg(): msgState[msgtype][alarmname] = (timestamp, headers, value) + # Clear most recent ack on new alarming instance + if msgtype == 'Alarming' and value['msg']['alarming'] == True: + msgState['Ack'].pop(alarmname, None) + + # Clear most recent ackEPICS on new alarming instance + if msgtype == 'AlarmingEPICS' and value['msg']['sevr'] in ["MINOR", "MAJOR"]: + msgState['AckEPICS'].pop(alarmname, None) + if msg.offset() + 1 == highOffsets[topic]: topicLoaded[topic] = True