FileStateStore

Tracks which transcript files have been ingested, keyed by mtime.

Usage

Source

FileStateStore()

Backed by a single async SQLite (aiosqlite) database with WAL journaling and a task lock, so it is safe to share one store across concurrent tasks. Consumers compose their own writes alongside record_file() inside transaction() to keep ingestion state and derived records atomic.

Example

store = await FileStateStore.open(Path(“state.db”), extra_schema=MY_SCHEMA) async with store.transaction() as conn: … await conn.execute(“INSERT INTO my_table VALUES (?)”, (value,)) … await store.record_file(str(path), mtime)