mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-04-06 06:53:32 +00:00
Merge branch 'develop' into ff-agent-fixes
This commit is contained in:
commit
fb188bc5ee
4 changed files with 160 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue