wrolpi/modules/archive/test
lrnselfreliance 32405a9132
A download records the sha256 of its files in the wrolpi section (#904)
* A download records the sha256 of its files in the wrolpi section

A video download writes `wrolpi.sha256` into its .info.json; an archive download writes it into
its .readability.json.  Sums are keyed by suffix, so a rename or Reorganize keeps them valid,
and the metadata JSON holding them is not hashed.

Large files are hashed in execute_download (in a thread, without the DB session).  Finalize
reuses those sums while a file's mtime is unchanged and hashes only files finalize created or
changed (a converted poster, the ffprobe json).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* A video download hashes only for an info json, and finalize never suspends

Finalize holds the write session; awaiting the hash let the loop run a switch whose
write waited on that session, stalling the loop for the busy timeout.  Finalize now
hashes inline: the large files were hashed in execute_download.

A download that writes no info json has nowhere to keep the sums, so it no longer
reads its files to hash them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 19:34:49 -06:00
..
__init__.py A new start 2021-11-01 16:43:09 -06:00
test_api.py Archive and doc pages record a view in its own write transaction (#813) 2026-10-11 14:13:50 -06:00
test_archive_downloader.py A download records the sha256 of its files in the wrolpi section (#904) 2026-10-30 19:34:49 -06:00
test_archive_modeler_loop.py Archives: an unpaired-surrogate title must not kill the modeler. 2026-07-13 19:25:30 -06:00
test_collection_id_bug.py Upgrade to SQLAlchemy 2.0 (synchronous) (#803) 2026-10-09 15:08:40 -06:00
test_compressed_singlefile.py HTML indexer is binary-safe; it indexes the page inside a compressed singlefile. 2026-06-12 17:24:02 -06:00
test_config_import_scenarios.py Detecting collection directories using collection formatting rather than relying on parent directory of file groups, because those are now longer always in the collection directory. 2026-02-07 17:16:08 -07:00
test_domain_tagging.py Fixing bug where configs could be overwritten with empty configs on first refresh. Fixing bug where configs were displayed as JSON in admin settings. 2026-03-22 12:56:37 -06:00
test_domains_config.py Database configs carry a version the database keeps too (#866) 2026-10-24 14:58:18 -06:00
test_domains_config_import.py domains.yaml imports by diffing (#871) 2026-10-25 11:41:59 -06:00
test_lib.py Remove code that only tests called (#888) 2026-10-27 16:00:27 -06:00
test_models.py Storing parent_download_url in a file group's json file after download has completed. 2026-03-03 15:54:22 -07:00