Fix Spotify enrichment worker infinite loop on pre-matched artists
Artists with an existing spotify_artist_id but NULL spotify_match_status were fetched by the priority queue every ~3 seconds. _process_artist returned early (preserving the ID) without marking the status, so the same artist was re-queued indefinitely — burning CPU and inflating API call counters. Now marks the artist as 'matched' on the early-return path.
This commit is contained in:
parent
8866c4654b
commit
9d77c403cc
2 changed files with 2 additions and 0 deletions
|
|
@ -455,6 +455,7 @@ class SpotifyWorker:
|
|||
existing_id = self._get_existing_id('artist', artist_id)
|
||||
if existing_id:
|
||||
logger.debug(f"Preserving existing Spotify ID for artist '{artist_name}': {existing_id}")
|
||||
self._mark_status('artist', artist_id, 'matched')
|
||||
return
|
||||
|
||||
results = self.client.search_artists(artist_name, limit=5)
|
||||
|
|
|
|||
|
|
@ -3609,6 +3609,7 @@ const WHATS_NEW = {
|
|||
{ title: 'Fix Wishlist Dropping Cross-Album Tracks', desc: 'Wishlist cleanup was removing same-titled tracks from different albums even when Allow Duplicates was enabled. Cleanup now respects the setting — same song from different albums can coexist in the wishlist' },
|
||||
{ title: 'Fix "Replace Lower Quality" Setting Not Persisting', desc: 'The import section appeared twice in the settings save payload — the second instance (with only staging_path) overwrote the first (with replace_lower_quality). Merged into a single block' },
|
||||
{ title: 'Inbound Music Request API', desc: 'New POST /api/v1/request endpoint — trigger downloads from Discord bots, Home Assistant, curl, or any external tool. Async with status polling and optional notify_url callback. New "Webhook Received" automation trigger and "Search & Download" action in the Automation Hub' },
|
||||
{ title: 'Fix Spotify Enrichment Worker Infinite Loop', desc: 'Artists with an existing Spotify ID but no match status got stuck in the enrichment queue — the worker processed them every 3 seconds forever without marking them as done. Now correctly marks them as matched' },
|
||||
|
||||
// --- April 14, 2026 ---
|
||||
{ date: 'April 14, 2026' },
|
||||
|
|
|
|||
Loading…
Reference in a new issue