INNER CODE UNIT · Python
get_app
omnirexflora-labs/omnicoreagent · src/omnicoreagent/serve/server.py:197
def get_app(self) -> FastAPI:
"""
Get the FastAPI application instance.
Useful for mounting in existing applications or for testing.
Returns:
The FastAPI application
"""
return self.app
def bind_server_socket(host: str, port: int) -> socket.socket:
"""Take the port before the server starts up.
uvicorn runs the app's startup, then binds; a startup that took 26-110 s
(the 0.5.0rc2 gate) found a taken port only at the end, while clients
polling it reached whatever held it.