ibs/sql_app/utils.py
HeshamTB 20dfa6dcc4 sql_app: Respond to emergency events record db entry
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-06-11 18:05:52 +03:00

12 lines
168 B
Python

from .database import SessionLocal
def get_db():
db = SessionLocal()
try:
yield db
finally:
db.close()
EMERG_TEMP = 50
EMERG_SMOKE = 1000