diff --git a/monkey/common/event_queue/i_event_queue.py b/monkey/common/event_queue/i_event_queue.py index 06a99b163..47788f263 100644 --- a/monkey/common/event_queue/i_event_queue.py +++ b/monkey/common/event_queue/i_event_queue.py @@ -33,11 +33,11 @@ class IEventQueue(ABC): pass @abstractstaticmethod - def subscribe_tags(tags: Sequence[str], subscriber: Callable[[AbstractEvent], None]): + def subscribe_tag(tag: str, subscriber: Callable[[AbstractEvent], None]): """ - Subscribes a subscriber to all specified event tags + Subscribes a subscriber to the specified event tag - :param tags: Event tags to which the subscriber should subscribe + :param tag: Event tag to which the subscriber should subscribe :param subscriber: Callable that should subscribe to events """ diff --git a/monkey/common/event_queue/pypubsub_event_queue.py b/monkey/common/event_queue/pypubsub_event_queue.py index e2e6e8765..711187577 100644 --- a/monkey/common/event_queue/pypubsub_event_queue.py +++ b/monkey/common/event_queue/pypubsub_event_queue.py @@ -22,9 +22,8 @@ class PyPubSubEventQueue(IEventQueue): pub.subscribe(listener=subscriber, topicName=event_type_name) @staticmethod - def subscribe_tags(tags: Sequence[str], subscriber: Callable[[AbstractEvent], None]): - for tag in tags: - pub.subscribe(listener=subscriber, topicName=tag) + def subscribe_tag(tag: str, subscriber: Callable[[AbstractEvent], None]): + pub.subscribe(listener=subscriber, topicName=tag) @staticmethod def publish(event: AbstractEvent, data: Any = None):