Skip to content

Commit cda30c0

Browse files
committed
🐛 fix: 실행되다 멈추는 오류 수정
1 parent ec3ce03 commit cda30c0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@
1111
global_exception_handler,
1212
)
1313

14+
import asyncio
15+
1416
@asynccontextmanager
1517
async def lifespan(app: FastAPI):
18+
loop = asyncio.get_event_loop()
19+
await loop.run_in_executor(None, loader.load_all)
1620
loader.load_all()
1721
print("모델/DB 로딩 완료")
1822

0 commit comments

Comments
 (0)