api 의존성 추가 및 DB 설정 변경
This commit is contained in:
1 parent
f008ed4010
commit
ab4dc6fb81
5 files changed
+37
-4
No files matched your search
+3
-1
@@ -5,11 +5,13 @@ from fastapi import FastAPI
|
||||
from pipelines import worker
|
||||
from routers import f1, playreel
|
||||
from utils import blob
|
||||
from utils.database import close_engine
|
||||
from utils.database import close_engine, create_missing_tables
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
# 테이블 정의는 tables.task 를 임포트한 라우터·파이프라인이 이미 등록해 둔다
|
||||
await create_missing_tables()
|
||||
worker.start()
|
||||
yield
|
||||
await worker.stop()
|
||||
|
||||
Reference in new issue
Block a user