INNER CODE UNIT · Python

start

YichengYang-Ethan/oracle3 · oracle3/dashboard/server.py:399

    def start(self) -> None:
        """Start the dashboard server in a background thread."""
        import uvicorn

        app = _build_dashboard_app(self.engine)
        config = uvicorn.Config(
            app,
            host=self.host,
            port=self.port,
            log_level='warning',
            ws='wsproto',
        )
        self._uvicorn_server = uvicorn.Server(config)

        def _run():
            asyncio.run(self._uvicorn_server.serve())

        self._server_thread = threading.Thread(target=_run, daemon=True, name='dashboard')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…