forked from p15670423/monkey
Common: Change parameter name event_data -> event in Island event queue
This commit is contained in:
parent
265e083571
commit
71c7a9a533
|
@ -28,12 +28,12 @@ class IIslandEventQueue(ABC):
|
|||
pass
|
||||
|
||||
@abstractmethod
|
||||
def publish(self, topic: IslandEventTopic, event_data: Any = None):
|
||||
def publish(self, topic: IslandEventTopic, event: Any = None):
|
||||
"""
|
||||
Publishes an event topic with the given data
|
||||
|
||||
:param topic: Event topic to publish
|
||||
:param event_data: Event data to pass to subscribers with the event publish
|
||||
:param event: Event to pass to subscribers with the event publish
|
||||
"""
|
||||
|
||||
pass
|
||||
|
|
|
@ -52,7 +52,7 @@ class PyPubSubIslandEventQueue(IIslandEventQueue):
|
|||
# scope. Adding subscribers to self._refs prevents them from ever going out of scope.
|
||||
self._refs.append(subscriber)
|
||||
|
||||
def publish(self, topic: IslandEventTopic, event_data: Any = None):
|
||||
def publish(self, topic: IslandEventTopic, event: Any = None):
|
||||
topic_value = topic.value # needs to be a string for pypubsub
|
||||
|
||||
logger.debug(f"Publishing {topic_value} event")
|
||||
|
@ -61,4 +61,4 @@ class PyPubSubIslandEventQueue(IIslandEventQueue):
|
|||
# otherwise, errors will arise. The MDS of a topic is set when the topic is created,
|
||||
# which in our case is when a subscriber subscribes to a topic (in `subscribe()`)
|
||||
# which is new (hasn't been subscribed to before).
|
||||
self._pypubsub_publisher.sendMessage(topicName=topic_value, event=event_data)
|
||||
self._pypubsub_publisher.sendMessage(topicName=topic_value, event=event)
|
||||
|
|
Loading…
Reference in New Issue