This commit is contained in:
Igor Loskutov
2025-12-16 16:49:42 -05:00
parent 447bf97854
commit 7591387e52
2 changed files with 0 additions and 59 deletions

View File

@@ -13,7 +13,6 @@ from reflector.logger import logger
from reflector.metrics import metrics_init
from reflector.settings import settings
from reflector.views.daily import router as daily_router
from reflector.views.hatchet import router as hatchet_router
from reflector.views.meetings import router as meetings_router
from reflector.views.rooms import router as rooms_router
from reflector.views.rtc_offer import router as rtc_offer_router
@@ -99,7 +98,6 @@ app.include_router(user_ws_router, prefix="/v1")
app.include_router(zulip_router, prefix="/v1")
app.include_router(whereby_router, prefix="/v1")
app.include_router(daily_router, prefix="/v1/daily")
app.include_router(hatchet_router, prefix="/v1")
add_pagination(app)
# prepare celery

View File

@@ -1,57 +0,0 @@
"""Hatchet health and status endpoints."""
from fastapi import APIRouter
from reflector.settings import settings
router = APIRouter(prefix="/hatchet", tags=["hatchet"])
@router.get("/health")
async def hatchet_health():
"""Check Hatchet connectivity and status."""
if not settings.HATCHET_ENABLED:
return {"status": "disabled", "connected": False}
if not settings.HATCHET_CLIENT_TOKEN:
return {
"status": "unhealthy",
"connected": False,
"error": "HATCHET_CLIENT_TOKEN not configured",
}
try:
from reflector.hatchet.client import HatchetClientManager
# Get client to verify token is valid
client = HatchetClientManager.get_client()
# Try to get the client's gRPC connection status
# The SDK doesn't have a simple health check, so we just verify we can create the client
if client is not None:
return {"status": "healthy", "connected": True}
else:
return {
"status": "unhealthy",
"connected": False,
"error": "Failed to create client",
}
except ValueError as e:
return {"status": "unhealthy", "connected": False, "error": str(e)}
except Exception as e:
return {"status": "unhealthy", "connected": False, "error": str(e)}
@router.get("/workflow/{workflow_run_id}")
async def get_workflow_status(workflow_run_id: str):
"""Get the status of a workflow run."""
if not settings.HATCHET_ENABLED:
return {"error": "Hatchet is disabled"}
try:
from reflector.hatchet.client import HatchetClientManager
status = await HatchetClientManager.get_workflow_status(workflow_run_id)
return status
except Exception as e:
return {"error": str(e)}