diff --git a/florist/api/client.py b/florist/api/client.py index 86c8dd4..9fc2fa6 100644 --- a/florist/api/client.py +++ b/florist/api/client.py @@ -1,5 +1,6 @@ """FLorist client FastAPI endpoints.""" import json +import logging import uuid from pathlib import Path @@ -17,6 +18,9 @@ app = FastAPI() +LOGGER = logging.getLogger("uvicorn.error") + + @app.get("/api/client/connect") def connect() -> JSONResponse: """ @@ -96,4 +100,5 @@ def check_status(client_uuid: str, redis_host: str, redis_port: str) -> JSONResp return JSONResponse({"error": f"Client {client_uuid} Not Found"}, status_code=404) except Exception as ex: + LOGGER.exception(ex) return JSONResponse({"error": str(ex)}, status_code=500) diff --git a/florist/tests/integration/api/test_train.py b/florist/tests/integration/api/test_train.py index a3e4042..288250d 100644 --- a/florist/tests/integration/api/test_train.py +++ b/florist/tests/integration/api/test_train.py @@ -64,7 +64,7 @@ def test_train(): client_uuid = response.json()["client_uuids"][0] # Wait for training to finish - wait_for_metric(server_uuid, "fit_end", test_redis_host,test_redis_port, LOGGER, max_retries=80) + wait_for_metric(server_uuid, "fit_end", test_redis_host, test_redis_port, LOGGER, max_retries=80) # Check server metrics server_metrics_result = redis_conn.get(server_uuid)