Skip to content

Commit 741616d

Browse files
committed
Allow skipping API schema setup
1 parent b795506 commit 741616d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

api/app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
from contextlib import asynccontextmanager
23
from pathlib import Path
34

@@ -20,7 +21,8 @@
2021
@asynccontextmanager
2122
async def lifespan(app: Litestar):
2223
await open_pool()
23-
await ensure_schema()
24+
if os.getenv("OSMSG_SKIP_SCHEMA_ENSURE", "").lower() not in {"1", "true", "yes"}:
25+
await ensure_schema()
2426
try:
2527
yield
2628
finally:

0 commit comments

Comments
 (0)