Skip to content

Commit

Permalink
Clear latest ack on new alarming instances
Browse files Browse the repository at this point in the history
  • Loading branch information
slominskir committed Oct 29, 2020
1 parent e263f15 commit 242ca24
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 242ca24

Please sign in to comment.