first commit
This commit is contained in:
commit
34ea15a54d
246 changed files with 18660 additions and 0 deletions
11
backend/app/services/health.py
Normal file
11
backend/app/services/health.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
from sqlalchemy import text
|
||||
from sqlalchemy.exc import SQLAlchemyError
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
|
||||
def check_database(db: Session) -> bool:
|
||||
try:
|
||||
db.execute(text("SELECT 1"))
|
||||
return True
|
||||
except SQLAlchemyError:
|
||||
return False
|
||||
Loading…
Add table
Add a link
Reference in a new issue