Skip to content
Snippets Groups Projects
Commit 8269bca0 authored by Hobbs, Alexandra (Contractor)'s avatar Hobbs, Alexandra (Contractor)
Browse files

swallow engine error to prevent it from blocking mage deployments

parent 67429184
No related branches found
No related tags found
1 merge request!403Fix broken imports related to the __init__.py changes for /ws endpoints
......@@ -5,6 +5,7 @@ from sqlmodel import create_engine
from geomagio.api.db.models.metadata import MetadataTable
from geomagio.api.db.models.metadata_history import MetadataHistoryTable
from geomagio.api.db.models.session import session
class Tables(str, Enum):
......@@ -13,4 +14,9 @@ class Tables(str, Enum):
database_url = os.getenv("DATABASE_URL", "sqlite:///./api_database.db")
engine = create_engine(database_url)
try:
engine = create_engine(database_url)
except Exception as e:
print("error creating engine:", e)
pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment