TT-003: complete request-module integration into modular platform
- integrated request-module into module registry - moved backend into modules/request-module - added manifest.json and module.py - implemented dynamic router mounting - implemented dynamic static mounting - removed direct dependencies from platform core - verified startup with request-module - verified startup without request-module - added implementation_report_003.md
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
"""Health check routes."""
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
from sqlalchemy.orm import Session
|
||||
from sqlalchemy import text
|
||||
from request_app.core.database import get_db
|
||||
|
||||
router = APIRouter(tags=["Health"])
|
||||
|
||||
|
||||
@router.get("/health")
|
||||
async def health_check():
|
||||
"""Health check endpoint."""
|
||||
return {
|
||||
"status": "healthy",
|
||||
"service": "Service Request System",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
|
||||
|
||||
@router.get("/health/db")
|
||||
async def health_check_db(db: Session = Depends(get_db)):
|
||||
"""Check database connectivity."""
|
||||
try:
|
||||
db.execute(text("SELECT 1"))
|
||||
return {
|
||||
"status": "healthy",
|
||||
"database": "PostgreSQL",
|
||||
"message": "Database connection successful"
|
||||
}
|
||||
except Exception as e:
|
||||
return {
|
||||
"status": "unhealthy",
|
||||
"database": "PostgreSQL",
|
||||
"error": str(e)
|
||||
}
|
||||
Reference in New Issue
Block a user