def process_event(self, name, subject, data):
        """
        Process a single event.
        :param name:
        :param subject:
        :param data:
        """
        method_mapping = Registry.get_event(name)
        if not method_mapping:
            log.info('@{}.process_event no subscriber for event `{}`'
                     .format(self.__class__.__name__, name))
            return
        for event, methods in method_mapping.items():
            event_instance = event(subject, data)
            log.info('@{}.process_event `{}` for subject `{}`'.format(
                self.__class__.__name__,
                event_instance.__class__.__name__,
                subject
            ))
            for method in methods:
                with self._context_manager:
                    log.info('>> Calling subscriber `{}`'
                             .format(method.__name__))
                    method(event_instance)
def process_event ( self , name , subject , data ) : method_mapping = Registry . get_event ( name ) if not method_mapping : log . info ( '@{}.process_event no subscriber for event `{}`' . format ( self . __class__ . __name__ , name ) ) return for event , methods in method_mapping . items ( ) : event_instance = event ( subject , data ) log . info ( '@{}.process_event `{}` for subject `{}`' . format ( self . __class__ . __name__ , event_instance . __class__ . __name__ , subject ) ) for method in methods : with self . _context_manager : log . info ( '>> Calling subscriber `{}`' . format ( method . __name__ ) ) method ( event_instance )
Process a single event.
        :param name:
        :param subject:
        :param data: