fix issue where worker would retry the same host if failed.
This commit is contained in:
parent
2d866cf0dd
commit
6d9ee9f9c1
1 changed files with 5 additions and 1 deletions
|
|
@ -12700,7 +12700,11 @@ def _download_track_worker(task_id, batch_id=None):
|
|||
download_tasks[task_id]['current_candidate_index'] = 0
|
||||
download_tasks[task_id]['retry_count'] = 0
|
||||
download_tasks[task_id]['candidates'] = []
|
||||
download_tasks[task_id]['used_sources'] = set()
|
||||
# CRITICAL: Preserve used_sources from previous retry attempts (don't reset to empty set)
|
||||
# If this is a retry, the monitor will have already marked failed sources
|
||||
if 'used_sources' not in download_tasks[task_id]:
|
||||
download_tasks[task_id]['used_sources'] = set()
|
||||
# Else: keep existing used_sources to avoid retrying same failed hosts
|
||||
|
||||
# 1. Generate multiple search queries (like GUI's generate_smart_search_queries)
|
||||
artist_name = track.artists[0] if track.artists else None
|
||||
|
|
|
|||
Loading…
Reference in a new issue