(self, event_name, callbacks,
                      **kwargs)
运行回调函数
运行回调函数
运行回调函数
def _run_callback(self, event_name, callbacks,
                      **kwargs) -> Union[None, Callback]:
        """ 运行回调函数 """
        if not callbacks:
            return

        self.__callback_running = True
        try:
            for fn in callbacks[event_name]:
                ret = inject_call(fn, **kwargs)
                if ret in [
                        Callback.RET_RETRY, Callback.RET_ABORT,
                        Callback.RET_CONTINUE
                ]:
                    return ret
        finally:
            self.__callback_running = False
def _run_callback ( self , event_name , callbacks , * * kwargs ) -> Union [ None , Callback ] : if not callbacks : return self . __callback_running = True try : for fn in callbacks [ event_name ] : ret = inject_call ( fn , * * kwargs ) if ret in [ Callback . RET_RETRY , Callback . RET_ABORT , Callback . RET_CONTINUE ] : return ret finally : self . __callback_running = False