chore(downloads): log failed resolutions and tighten retry dataclass/tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -119,7 +119,7 @@ def _extract_vanity_from_url(url: str) -> Optional[str]:
|
||||
class _DownloadAttempt:
|
||||
"""Result of executing a download, possibly with a retry after campaign-ID resolution."""
|
||||
dl_result: DownloadResult
|
||||
resolved_campaign_id: Optional[str]
|
||||
resolved_campaign_id: Optional[str] = None
|
||||
|
||||
|
||||
async def _execute_download_with_retry(
|
||||
@@ -176,6 +176,11 @@ async def _execute_download_with_retry(
|
||||
return _DownloadAttempt(
|
||||
dl_result=retry_result, resolved_campaign_id=campaign_id
|
||||
)
|
||||
else:
|
||||
logger.warning(
|
||||
f"Could not resolve campaign ID for {subscription_name}/patreon ({vanity}); "
|
||||
f"original failure will be recorded"
|
||||
)
|
||||
|
||||
return _DownloadAttempt(dl_result=dl_result, resolved_campaign_id=None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user