Merge pull request #370 from f-kessler/develop

Clear buffer after multicastAlarm_ric received
This commit is contained in:
Bastian Schroll 2018-08-16 20:11:01 +02:00 committed by GitHub
commit 9ad6da6af2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View file

@ -9,6 +9,7 @@
##### Changed
- multicastAlarm Plugin - RICs die von multicastAlarm genutzt werden, müssen nicht mehr in der config bei allow_ric bzw. filter_range_start/filter_range_end berücksichtigt werden. [#357](https://github.com/Schrolli91/BOSWatch/pull/357)
- FFAgent Plugin - Debug Logging für die alarmHeaders eingebaut zwecks Troubleshooting [#354](https://github.com/Schrolli91/BOSWatch/pull/354)
- multicastAlarm Plugin - Buffer nach jedem Alarm löschen - erlaubt in kombination mit "doubleFilter_check_msg" die Verwendung in Netzen, die zwischen multicastAlarm RICs auch normale Alarme senden. #370(https://github.com/Schrolli91/BOSWatch/pull/370)
##### Deprecated
##### Removed
##### Fixed

View file

@ -144,7 +144,7 @@ multicastAlarm = 0
# time limit for alarms that do not belong to the multicastAlarm sequence in seconds
multicastAlarm_ignore_time = 15
# multicastAlarm delimiter RIC (usually used as a starting point for a alarm sequence) (can be empty)
# multicastAlarm delimiter RIC (usually used as a starting point for a alarm sequence). Needs to be empty if multicastAlarms are interrupted by normal alarms.
multicastAlarm_delimiter_ric =
# multicastAlarm RIC that is used to send the text message

View file

@ -29,7 +29,7 @@ def newEntrymultiList(data):
timestamp = int(time.time())
# multicastAlarm processing if enabled and delimiter RIC has been received
if data['ric'] == globalVars.config.get("multicastAlarm", "multicastAlarm_delimiter_ric"):
multiList = []
del multiList[:]
logging.debug("delimiter RIC received - buffer cleared")
else:
multiList.append([data, timestamp])
@ -61,3 +61,5 @@ def multicastAlarmExec(freq, data):
except:
logging.error("processing alarm failed")
logging.debug("processing alarm failed", exc_info=True)
del multiList[:]
logging.debug("multicastAlarm finished - buffer cleared")