def post_trigger_run(main_plugin: MainPlugin, analysis_plugins=None, **kwargs) -> None: """ Calls the main plugins and every enabled analysis plugins after running the trigger :param main_plugin: the main plugin to run :param analysis_plugins: any analysis plugin to stack :param kwargs: keyword arguments passed to the plugins """ main_plugin.post_trigger_run(**kwargs) if analysis_plugins is not None: for plugin in analysis_plugins: plugin().post_trigger_run(main_plugin=main_plugin, **kwargs)
def post_trigger_clean(main_plugin: MainPlugin, analysis_plugins=None, **kwargs): """ Calls the main plugins and every enabled analysis plugins if they need to clean files. Then calls all registered JANITORS functions :param main_plugin: the main plugin to run :param analysis_plugins: any analysis plugin to stack :param kwargs: keyword arguments passed to the plugins """ main_plugin.post_trigger_clean(**kwargs) if analysis_plugins is not None: for plugin in analysis_plugins: plugin().post_trigger_clean(main_plugin=main_plugin, **kwargs) for janitor in JANITORS: janitor()
def check_trigger_success(main_plugin: MainPlugin, **kwargs) -> int: """ Calls the main plugin to check if the trigger was successful or not :param main_plugin: the plugin to use :param kwargs: keyword arguments to pass to the plugin :return: 0|1|None on success|failure|unexpected event """ return main_plugin.check_trigger_success(**kwargs)