db like in tutorial
This commit is contained in:
parent
b5710b3dfb
commit
6b4c8b69b8
|
@ -19,6 +19,14 @@ notifications = defaultdict(list)
|
|||
Base.metadata.create_all(bind=engine)
|
||||
|
||||
|
||||
def get_db():
|
||||
db = SessionLocal()
|
||||
try:
|
||||
yield db
|
||||
finally:
|
||||
db.close()
|
||||
|
||||
|
||||
class Notifier:
|
||||
@staticmethod
|
||||
def __call__(idsonde, changes):
|
||||
|
|
Loading…
Reference in New Issue