Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
geomag-algorithms
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Geomagnetism Program
geomag-algorithms
Commits
8269bca0
Commit
8269bca0
authored
1 week ago
by
Hobbs, Alexandra (Contractor)
Browse files
Options
Downloads
Patches
Plain Diff
swallow engine error to prevent it from blocking mage deployments
parent
67429184
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!403
Fix broken imports related to the __init__.py changes for /ws endpoints
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
geomagio/api/db/database.py
+7
-1
7 additions, 1 deletion
geomagio/api/db/database.py
with
7 additions
and
1 deletion
geomagio/api/db/database.py
+
7
−
1
View file @
8269bca0
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment