forked from p15670423/monkey
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"
|
interrupted_message = f"Received a stop signal, skipping remaining {plugin_type}s"
|
||||||
for p in interruptible_iter(plugins, self._stop, interrupted_message):
|
for p in interruptible_iter(plugins, self._stop, interrupted_message):
|
||||||
# TODO: Catch exceptions to prevent thread from crashing
|
try:
|
||||||
callback(p)
|
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")
|
logger.info(f"Finished running {plugin_type}s")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue