platypush/event/processor/__init__.py
def process_event(self, event: Event):
        """ Processes an event and runs the matched hooks with the highest score """

        if not event.disable_web_clients_notification:
            self.notify_web_clients(event)

        matched_hooks = set()
        priority_hooks = set()
        max_score = -sys.maxsize
        max_priority = 0

        for hook in self.hooks:
            match = hook.matches_event(event)
            if match.is_match:
                if match.score > max_score:
                    matched_hooks = {hook}
                    max_score = match.score
                elif match.score == max_score:
                    matched_hooks.add(hook)

                if hook.priority > max_priority:
                    priority_hooks = {hook}
                    max_priority = hook.priority
                elif hook.priority == max_priority:
                    priority_hooks.add(hook)

        matched_hooks.update(priority_hooks)
        for hook in matched_hooks:
            hook.run(event)
 Processes an event and runs the matched hooks with the highest score 
Processes an event and runs the matched hooks with the highest score
Processes an event and runs the matched hooks with the highest score
def process_event(self, event: Event):
        if not event.disable_web_clients_notification:
            self.notify_web_clients(event)
        matched_hooks = set()
        priority_hooks = set()
        max_score = -sys.maxsize
        max_priority = 0
        for hook in self.hooks:
            match = hook.matches_event(event)
            if match.is_match:
                if match.score > max_score:
                    matched_hooks = {hook}
                    max_score = match.score
                elif match.score == max_score:
                    matched_hooks.add(hook)
                if hook.priority > max_priority:
                    priority_hooks = {hook}
                    max_priority = hook.priority
                elif hook.priority == max_priority:
                    priority_hooks.add(hook)
        matched_hooks.update(priority_hooks)
        for hook in matched_hooks:
            hook.run(event)
def process_event ( self , event : Event ) : if not event . disable_web_clients_notification : self . notify_web_clients ( event ) matched_hooks = set ( ) priority_hooks = set ( ) max_score = - sys . maxsize max_priority = 0 for hook in self . hooks : match = hook . matches_event ( event ) if match . is_match : if match . score > max_score : matched_hooks = { hook } max_score = match . score elif match . score == max_score : matched_hooks . add ( hook ) if hook . priority > max_priority : priority_hooks = { hook } max_priority = hook . priority elif hook . priority == max_priority : priority_hooks . add ( hook ) matched_hooks . update ( priority_hooks ) for hook in matched_hooks : hook . run ( event )
Processes an event and runs the matched hooks with the highest score
Processes an event and runs the matched hooks with the highest score
""" Processes an event and runs the matched hooks with the highest score """
self
event
Event