wrolpi/modules/docs
Roland 821c3991be
Prevent doc_modeler from looping on persistent modeling failures
Addresses review feedback: the new `Doc.id IS NULL` gate keeps matching a
doc whose _model_doc fails without persisting a Doc row. With
>=DOC_PROCESSING_LIMIT such docs, every batch re-selected the same failing
files, `processed` never dropped below the limit, and the loop hung --
starving later docs. Reproduced with a patched _model_doc that always
raises.

Track attempted FileGroup ids per run and exclude them from the query, so
the candidate pool strictly shrinks and the loop always terminates. Failed
docs are retried on the next refresh (unchanged behavior).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 13:07:48 -06:00
..
test Prevent doc_modeler from looping on persistent modeling failures 2026-07-20 13:07:48 -06:00
__init__.py Prevent doc_modeler from looping on persistent modeling failures 2026-07-20 13:07:48 -06:00
api.py Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00
conftest.py Add Docs module for searching and organizing PDFs and EPUBs 2026-03-20 14:17:06 -06:00
extractors.py Adding simple search to epub viewer. 2026-04-13 17:23:20 -06:00
lib.py Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
models.py Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
schema.py Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00