Skip to content

Commit

Permalink
Try to ignore migration errors (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
msm-cert authored and mickol34 committed Nov 6, 2024
1 parent 807e01d commit 68b4645
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import tempfile
import zipfile
import jwt
import logging
import base64
from cryptography.hazmat.primitives import serialization

Expand Down Expand Up @@ -49,7 +50,10 @@

@asynccontextmanager
async def lifespan(app: FastAPI):
db.alembic_upgrade()
try:
db.alembic_upgrade()
except Exception:
logging.exception("Failed to apply migrations. Trying to continue...")
yield


Expand Down

0 comments on commit 68b4645

Please sign in to comment.