Spaces:
Paused
Paused
File size: 416 Bytes
3444a36 9e6aa30 90dbc1a 3444a36 90dbc1a 3444a36 9e6aa30 3444a36 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import json
import logging
from fastapi import APIRouter
from helpers 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": "still alive..."})
except Exception as e:
logging.error(f"exception:{e}.")
return json.dumps({"msg": "request failed"})
|