INNER CODE UNIT · Python

get_reader_task

permitio/fastapi_websocket_pubsub · fastapi_websocket_pubsub/event_broadcaster.py:260

    def get_reader_task(self):
        return self._subscription_task

    async def __read_notifications__(self):
        """
        read incoming broadcasts and posting them to the intreal notifier
        """
        logger.debug("Starting broadcaster listener")
        try:
            # Subscribe to our channel
            async with self.listening_broadcast_channel.subscribe(
                channel=self._channel
            ) as subscriber:
                async for event in subscriber:
                    try:
                        notification = BroadcastNotification.parse_raw(event.message)
                        # Avoid re-publishing our own broadcasts
                        if notification.notifier_id != self._id:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…