Skip to content

Commit e0da8c8

Browse files
authored
Use cached settings in database configuration (#74)
1 parent fe971cb commit e0da8c8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

backend/api/db.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def get_engine_url() -> str:
3232
# Use the cached settings instance instead of instantiating ``Settings``
3333
# directly so configuration is read a single time across the app.
3434
settings = get_settings()
35+
# ``get_settings`` returns the cached Settings instance from api.config.
3536
url = os.getenv("DATABASE_URL", settings.database_url)
3637
if url.startswith("sqlite"):
3738
return url

0 commit comments

Comments
 (0)