feat(tasks): emit progress events from nine more task handlers#10
Merged
Conversation
Wires analyze_series, generate_thumbnails, generate_series_thumbnails, renumber_series_batch, reprocess_series_titles, cleanup_series_exports, scan_library, user_plugin_sync, and the book-mode path of plugin_auto_match to publish TaskProgressEvent so they surface in the "Active Tasks" UI tracker. Previously only refresh_library_metadata and export_series emitted progress, leaving most long-running operations silent in the UI. For per-row loops (analyze, thumbnails, renumber, reprocess, auto-match) the handlers emit an initial 0/total event followed by current/total updates after each iteration, matching the existing refresh_library_metadata pattern. For scan_library, SharedScanState gains an optional task_id + broadcaster so every existing send_progress() call site also publishes a TaskProgressEvent (files_processed/files_total with series and book counts in the message). scan_library() takes a new task_id parameter; existing test call sites pass None. cleanup_series_exports and user_plugin_sync use phase-based progress (3 and 4 phases respectively) since they have no single dominant per-row loop. Users see meaningful "Pulling…", "Pushing…", "Sweeping stale .tmp files…" messages instead of nothing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires analyze_series, generate_thumbnails, generate_series_thumbnails, renumber_series_batch, reprocess_series_titles, cleanup_series_exports, scan_library, user_plugin_sync, and the book-mode path of plugin_auto_match to publish TaskProgressEvent so they surface in the "Active Tasks" UI tracker. Previously only refresh_library_metadata and export_series emitted progress, leaving most long-running operations silent in the UI.
For per-row loops (analyze, thumbnails, renumber, reprocess, auto-match) the handlers emit an initial 0/total event followed by current/total updates after each iteration, matching the existing refresh_library_metadata pattern.
For scan_library, SharedScanState gains an optional task_id + broadcaster so every existing send_progress() call site also publishes a TaskProgressEvent (files_processed/files_total with series and book counts in the message). scan_library() takes a new task_id parameter; existing test call sites pass None.
cleanup_series_exports and user_plugin_sync use phase-based progress (3 and 4 phases respectively) since they have no single dominant per-row loop. Users see meaningful "Pulling…", "Pushing…", "Sweeping stale .tmp files…" messages instead of nothing.