(self, db_path: Path = STATE_DB)
| 36 | """ |
| 37 | |
| 38 | def __init__(self, db_path: Path = STATE_DB): |
| 39 | self.db_path = db_path |
| 40 | self._lock = Lock() |
| 41 | self._conn: sqlite3.Connection = sqlite3.connect( |
| 42 | str(self.db_path), |
| 43 | timeout=30.0, |
| 44 | check_same_thread=False, |
| 45 | ) |
| 46 | self._conn.row_factory = sqlite3.Row |
| 47 | # Enable WAL mode for better concurrent read performance |
| 48 | self._conn.execute("PRAGMA journal_mode=WAL") |
| 49 | self._init_schema() |
| 50 | |
| 51 | def close(self): |
| 52 | """Close the persistent connection.""" |
nothing calls this directly
no test coverage detected