Преглед изворни кода

Revert "[unrelated] Properly close storage on web app exit"

This reverts commit 8c7d187433bdb977cfbabf2665165d4100016196.
jherve пре 1 година
родитељ
комит
2c7ac6dcd2
1 измењених фајлова са 1 додато и 3 уклоњено
  1. 1 3
      src/media_observer/web.py

+ 1 - 3
src/media_observer/web.py

@@ -71,9 +71,7 @@ async def get_db():
     if storage is None:
     if storage is None:
         storage = await Storage.create()
         storage = await Storage.create()
 
 
-    yield storage
-
-    await storage.close()
+    return storage
 
 
 
 
 async def get_similarity_search(storage: Storage = Depends(get_db)):
 async def get_similarity_search(storage: Storage = Depends(get_db)):