improved logging

This commit is contained in:
Ayzen
2026-06-06 00:52:52 +03:00
parent af6005d68f
commit aea49f6128
65 changed files with 1206 additions and 240 deletions
+5
View File
@@ -30,6 +30,8 @@ class WebUiServer:
def start(self) -> None:
"""Start serving on the background thread."""
config = self._server.config
logger.info("Starting web UI server on %s:%s", config.host, config.port)
self._thread.start()
def is_alive(self) -> bool:
@@ -49,5 +51,8 @@ class WebUiServer:
def stop(self) -> None:
"""Ask uvicorn to exit and wait briefly for the thread to unwind."""
logger.info("Stopping web UI server")
self._server.should_exit = True
self._thread.join(timeout=5.0)
if self._thread.is_alive():
logger.warning("Web UI server thread did not stop within timeout")