lisa-on-cuda / app /routes.py
alessandro trinca tornidor
[refactor] move routes to dedicated routes.py, move app helper functions to dedicated app_helpers.py
8959fb9
raw
history blame
401 Bytes
import json
import logging
from fastapi import APIRouter
from utils import session_logger
router = APIRouter()
@router.get("/health")
@session_logger.set_uuid_logging
def health() -> str:
try:
logging.info("health check")
return json.dumps({"msg": "ok"})
except Exception as e:
logging.error(f"exception:{e}.")
return json.dumps({"msg": "request failed"})