From a5cc37869c6b0d4ffabfe902d38d7cacedb209c1 Mon Sep 17 00:00:00 2001 From: "backend.im" Date: Fri, 16 May 2025 12:56:05 +0000 Subject: [PATCH] Update main.py --- main.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/main.py b/main.py index 152165f..3f57259 100644 --- a/main.py +++ b/main.py @@ -21,26 +21,6 @@ app = FastAPI( version="0.1.0", ) -@app.get("/health", tags=["health"], summary="Health check endpoint") -def health_check(db: Session = Depends(get_db)): - """ - Check the health of the application: - - - **status**: Overall application status - - **database**: Database connection status - """ - try: - # Make a simple query to check if the database is responsive - db.execute("SELECT 1") - db_status = "healthy" - except Exception: - db_status = "unhealthy" - - return { - "status": "ok", - "database": db_status - } - app.include_router(api_router, prefix=settings.API_V1_STR) def find_available_port(start_port, max_attempts=10):