Created
January 28, 2022 11:28
-
-
Save codephillip/71ed38e3f721579a87c5405aaf37c52e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ms_foobar_app.events.event_bus_root import EventBus | |
class EventPublisher(EventBus): | |
def __init__(self): | |
super(EventPublisher, self).__init__() | |
def publish(self, subject, data): | |
self.loop.run_until_complete(self.__publish(subject, data)) | |
async def __publish(self, subject, data): | |
await self.sc.publish(subject, self.byte_encode_data(data)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment