Agent: Catch exception when running plugins in master
This commit is contained in:
parent
c82a9cfbf0
commit
9495027678
|
@ -225,8 +225,10 @@ class AutomatedMaster(IMaster):
|
|||
|
||||
interrupted_message = f"Received a stop signal, skipping remaining {plugin_type}s"
|
||||
for p in interruptible_iter(plugins, self._stop, interrupted_message):
|
||||
# TODO: Catch exceptions to prevent thread from crashing
|
||||
callback(p)
|
||||
try:
|
||||
callback(p)
|
||||
except Exception as ex:
|
||||
logger.debug(f"Exception encountered when running {plugin_type} {p}: {str(ex)}")
|
||||
|
||||
logger.info(f"Finished running {plugin_type}s")
|
||||
|
||||
|
|
Loading…
Reference in New Issue