Common: Change IEventQueue and PyPubSubEventQueue's subscribe_tags() -> subscribe_tag()
This commit is contained in:
parent
e92d67bfe8
commit
ae666d3dd3
|
@ -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
|
||||
"""
|
||||
|
||||
|
|
|
@ -22,8 +22,7 @@ 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:
|
||||
def subscribe_tag(tag: str, subscriber: Callable[[AbstractEvent], None]):
|
||||
pub.subscribe(listener=subscriber, topicName=tag)
|
||||
|
||||
@staticmethod
|
||||
|
|
Loading…
Reference in New Issue