Coverage for src / local_deep_research / database / pool_config.py: 100%

2 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-04-14 23:55 +0000

1"""Shared SQLAlchemy connection pool configuration constants. 

2 

3Pool sizing (pool_size, max_overflow) remains per-engine since 

4different databases have different concurrency profiles. 

5""" 

6 

7# Validate connections before checkout (detects stale/broken connections) 

8POOL_PRE_PING = True 

9 

10# Recycle connections after 1 hour to release stale file handles. 

11# SQLite reopens are cheap (no network roundtrip), so a shorter 

12# interval reduces the window for WAL handle accumulation. 

13# See ADR-0004. 

14POOL_RECYCLE_SECONDS = 3600