Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
WSL0809 committed Jun 2, 2024
1 parent 55e41ec commit 89ca2c0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
room_router)
from fastapi.middleware.cors import CORSMiddleware

with engine.connect() as conn:
conn.execute("SELECT pg_advisory_lock(123456);")
model.Base.metadata.create_all(bind=engine)
conn.execute("SELECT pg_advisory_unlock(123456);")

SHOW_DOCS = os.getenv("SHOW_DOCS", "false").lower() == "true"
app = FastAPI(docs_url="/docs" if SHOW_DOCS else None)
app.include_router(change_room_router)
Expand Down

0 comments on commit 89ca2c0

Please sign in to comment.