INNER CODE UNIT · Python
_serve
br3ndonland/inboard · inboard/gunicorn_workers.py:116
async def _serve(self) -> None:
self.config.app = self.wsgi
server = Server(config=self.config)
self._install_sigquit_handler()
# Uvicorn exits with status 3 on startup failure, matching Gunicorn's
# WORKER_BOOT_ERROR and stopping the arbiter instead of respawning.
await server.serve(sockets=self.sockets)
def run(self) -> None:
with asyncio.Runner(loop_factory=self.config.get_loop_factory()) as runner:
return runner.run(self._serve())
async def callback_notify(self) -> None:
self.notify()
class UvicornH11Worker(UvicornWorker):
CONFIG_KWARGS: ClassVar[dict[str, str]] = {"loop": "asyncio", "http": "h11"}