INNER CODE UNIT · Python

__read_notifications__

permitio/fastapi_websocket_pubsub · fastapi_websocket_pubsub/event_broadcaster.py:263

    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:
                            logger.debug(
                                "Handling incoming broadcast event: {}".format(
                                    {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…