refactor(progress): return bound callable from start_download (#30)
start_download(book) now returns a per-book bound callable instead of raw task_id. Task identity is fully internal to progress.py — no caller ever sees or passes task_id. - Orchestrator: removed closure pattern, now threads progress_cb = start_download(book) directly - downloader: download_book() accepts optional progress= kwarg, uses it when provided (falls back to reporter.update) - cli.py: forwards progress kwarg through _download_fn - Public update() drops task_id param; bound callable calls _progress.update(task_id_internal) directly 382 tests pass (+11 new), 6/6 AC met.
This commit is contained in:
1 parent
9ac581e5b7
commit
1f46467f2c
10 files changed
+398
-95
No files matched your search
@@ -28,6 +28,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
extract transport from session. Remove config from accompanying_files.
|
||||
368 tests pass (+15 new). Closes #29.
|
||||
|
||||
- **progress:** Return bound callable from start_download() instead of raw
|
||||
task_id. Task identity is fully internal to progress.py. Orchestrator
|
||||
no longer creates per-book closures — passes the bound callback
|
||||
directly. download_book() accepts optional progress= kwarg. Public
|
||||
update() drops task_id param. 382 tests pass (+11 new). Closes #30.
|
||||
|
||||
10:9bb|### Fixed
|
||||
- **progress:** Wire task_id through parallel progress callback.
|
||||
All concurrent download updates went to the same (most recently started) bar
|
||||
|
||||
Reference in new issue
Block a user