Merge branch 'develop' into ff-agent-fixes

This commit is contained in:
Bastian Schroll 2019-08-28 09:54:19 +02:00 committed by GitHub
commit fb188bc5ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 160 additions and 4 deletions

View file

@ -14,6 +14,7 @@ import logging # Global logger
import time # timestamp
from includes import globalVars # Global variables
from copy import deepcopy # copy objects to avoid issues if the objects will be changed by the plugin's during runtime and during asynch/threaded processing
##
#
@ -40,7 +41,7 @@ def processAlarmHandler(typ, freq, data):
logging.debug("starting processAlarm async")
try:
from threading import Thread
Thread(target=processAlarm, args=(typ, freq, data)).start()
Thread(target=processAlarm, args=(typ, freq, deepcopy(data))).start()
except:
logging.error("Error in starting alarm processing async")
logging.debug("Error in starting alarm processing async", exc_info=True)
@ -80,7 +81,7 @@ def processAlarm(typ, freq, data):
if regexFilter.checkFilters(typ, data, pluginName, freq):
logging.debug("call Plugin: %s", pluginName)
try:
plugin.run(typ, freq, data)
plugin.run(typ, freq, deepcopy(data))
logging.debug("return from: %s", pluginName)
except:
# call next plugin, if one has thrown an exception
@ -88,7 +89,7 @@ def processAlarm(typ, freq, data):
else: # RegEX filter off - call plugin directly
logging.debug("call Plugin: %s", pluginName)
try:
plugin.run(typ, freq, data)
plugin.run(typ, freq, deepcopy(data))
logging.debug("return from: %s", pluginName)
except:
# call next plugin, if one has thrown an exception