File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change 44from fastapi import FastAPI
55from fastapi_cache import FastAPICache
66from fastapi_cache .backends .inmemory import InMemoryBackend
7- # from fastapi_cache.backends.redis import RedisBackend # Uncomment for Redis
87
98from gs .backend .data .database .engine import get_db_session , setup_database
109from gs .backend .data .resources .utils import add_main_commands
@@ -15,7 +14,7 @@ async def lifespan(_: FastAPI) -> AsyncGenerator[None, None]:
1514 """Lifecycle event for the FastAPI app."""
1615 # Initialize FastAPI Cache (in memory cache)
1716 FastAPICache .init (InMemoryBackend ())
18-
17+
1918 # Must all the get_db_session each time when pass it into a separate function.
2019 # Otherwise, will get transaction is inactive error
2120 setup_database (get_db_session ())
You can’t perform that action at this time.
0 commit comments