Spaces:
Sleeping
Sleeping
Claude Code - Backend Implementation Specialist Claude Sonnet 4.5 commited on
Commit ·
ca6c408
1
Parent(s): f2b5c2a
Fix import error in health check endpoint
Browse files- Change get_db to get_session to match database.py export
- Resolve ImportError preventing application startup
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- src/api/health.py +2 -2
src/api/health.py
CHANGED
|
@@ -5,7 +5,7 @@ from fastapi import APIRouter, status
|
|
| 5 |
from fastapi.responses import JSONResponse
|
| 6 |
from datetime import datetime
|
| 7 |
from sqlalchemy import text
|
| 8 |
-
from src.database import
|
| 9 |
|
| 10 |
router = APIRouter()
|
| 11 |
|
|
@@ -36,7 +36,7 @@ async def readiness_check():
|
|
| 36 |
"""
|
| 37 |
try:
|
| 38 |
# Check database connectivity
|
| 39 |
-
db = next(
|
| 40 |
|
| 41 |
# Simple query to verify database connection
|
| 42 |
result = db.execute(text("SELECT 1"))
|
|
|
|
| 5 |
from fastapi.responses import JSONResponse
|
| 6 |
from datetime import datetime
|
| 7 |
from sqlalchemy import text
|
| 8 |
+
from src.database import get_session
|
| 9 |
|
| 10 |
router = APIRouter()
|
| 11 |
|
|
|
|
| 36 |
"""
|
| 37 |
try:
|
| 38 |
# Check database connectivity
|
| 39 |
+
db = next(get_session())
|
| 40 |
|
| 41 |
# Simple query to verify database connection
|
| 42 |
result = db.execute(text("SELECT 1"))
|