INNER CODE UNIT · Python

_ensure_config_listener

yihong1120/Construction-Hazard-Detection · main.py:110

    async def _ensure_config_listener(self) -> None:
        """Listen for committed stream-config changes between poll cycles."""
        if self._config_listener_connection is not None:
            return

        await self._ensure_db_pool()
        if self.db_pool is None:
            return

        connection = await self.db_pool.acquire()
        try:
            await connection.add_listener(
                'stream_config_changed',
                self._on_stream_config_changed,
            )
        except Exception:
            await self.db_pool.release(connection)
            raise

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…