Skip to content

Job tracker#58

Merged
tphoney merged 3 commits intomainfrom
job_tracker
Feb 8, 2026
Merged

Job tracker#58
tphoney merged 3 commits intomainfrom
job_tracker

Conversation

@tphoney
Copy link
Owner

@tphoney tphoney commented Jan 25, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements a robust, per-job progress tracking system to replace the previous global progress counters. The implementation adds support for concurrent job management, progress updates, and job cancellation, whilst also updating the htmx library from version 1.8.2 to 2.0.8.

Changes:

  • Introduces a thread-safe JobTracker system with support for multiple concurrent jobs, progress tracking, and cancellation
  • Refactors movies, TV, and music modules to use the new job tracking interface instead of global variables
  • Updates all external lookup modules (Amazon, Cinema Paradiso, Spotify, MusicBrainz) to accept context for cancellation support
  • Updates htmx from 1.8.2 to 2.0.8 across all HTML files

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
web/server.go Implements the core JobTracker infrastructure with mutex-protected job management, cleanup routines, and HTTP handlers for progress and cancellation
web/movies/movies.go Refactored to use JobTracker interface, removes global state variables, passes context to lookup functions
web/tv/tv.go Refactored to use JobTracker interface, removes global state variables, passes context to lookup functions
web/music/music.go Refactored to use JobTracker interface, removes global state variables, adds validation helper function
types/types.go Defines the JobTracker interface for dependency injection
amazon/amazon.go Updated to accept context and progress callback, adds cancellation checks in parallel operations
cinemaparadiso/cinemaparadiso.go Updated to accept context and progress callback, adds cancellation checks in parallel operations
spotify/spotify.go Updated to accept context and progress callback with two-phase progress reporting (artists 0-50%, albums 50-100%)
musicbrainz/musicbrainz.go Updated to accept context parameter and handle cancellation
web/movies/movies.html Updated htmx version from 1.8.2 to 2.0.8
web/tv/tv.html Updated htmx version from 1.8.2 to 2.0.8
web/music/music.html Updated htmx version from 1.8.2 to 2.0.8
web/settings/settings.html Updated htmx version from 1.8.2 to 2.0.8
web/index.html Updated htmx version from 1.8.2 to 2.0.8
spotify/spotify_test.go Updated tests to use t.Context() instead of context.Background()
musicbrainz/musicbrainz_test.go Updated tests to use t.Context() instead of context.Background()
amazon/amazon_test.go Updated tests to use context.Background() and nil progress callback
cinemaparadiso/cinemaparadiso_test.go Updated tests to use t.Context() instead of manually created context
cmd/amazon.go Updated to pass context.Background() and nil progress callback to lookup functions
cmd/cinemaparadiso.go Updated to pass context.Background() and nil progress callback to lookup functions
TODO Marked "Implement Robust, Per-Job Progress Tracking" as done

@tphoney tphoney merged commit 9d2e1bb into main Feb 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant