INNER CODE UNIT · Python

start_reader_task

permitio/fastapi_websocket_pubsub · fastapi_websocket_pubsub/event_broadcaster.py:227

    async def start_reader_task(self):
        """Spawn a task reading incoming broadcasts and posting them to the intreal notifier
        Raises:
            BroadcasterAlreadyStarted: if called more than once per context
        Returns:
            the spawned task
        """
        # Make sure a task wasn't started already
        if self._subscription_task is not None:
            # we already started a task for this worker process
            logger.debug(
                "No need for listen task, already started broadcast listen task for this notifier"
            )
            return

        # Init new broadcast channel for reading
        try:
            if self.listening_broadcast_channel is None:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…