Files
OSIT-AE-API-FastAPI/app
Scott Idem 3db5f7c749 fix(P3): guard startup db connection with try/except in lib_sql_core
Wraps the deprecated global `db = engine.connect()` in a try/except so
a Docker startup race (MariaDB not yet ready) no longer crashes the
Gunicorn worker before it can serve any requests.

Sets db=None on failure; reconnect_db() on the lifespan bootstrap path
re-establishes it once credentials are confirmed.

TODO (P3 full): migrate lib_schema_v3.py:39 and lib_api_crud_v3.py:166
off the global db to engine.connect() context managers, then remove it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 19:28:28 -04:00
..
2026-04-16 20:09:12 -04:00
2020-09-14 12:41:02 -04:00
2026-01-06 18:06:45 -05:00
2026-02-06 13:56:40 -05:00
2026-04-02 16:51:34 -04:00