mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
fix(download): 下载失败冷却日志补充失败原因和重试时间
将 _active_download_failure_fingerprints 返回类型从 Set[str] 改为 Dict[str, DownloadFailure], __is_context_in_failure_cooldown 从失败记录中提取 error_message 和 next_retry_at, 日志输出格式改为「近期添加下载失败(失败原因:xxx),暂时跳过该资源,将于 yyyy-MM-dd HH:mm:ss 后重试」。
This commit is contained in:
@@ -921,7 +921,11 @@ def test_batch_download_skips_failed_subscription_resource_and_tries_next(monkey
|
||||
"""
|
||||
assert now_time
|
||||
assert failed_fingerprint in fingerprints
|
||||
return {failed_fingerprint: SimpleNamespace(fingerprint=failed_fingerprint)}
|
||||
return {failed_fingerprint: SimpleNamespace(
|
||||
fingerprint=failed_fingerprint,
|
||||
error_message="无法读取种子文件",
|
||||
next_retry_at="2026-01-02 03:04:05",
|
||||
)}
|
||||
|
||||
monkeypatch.setattr(download_module, "DownloadFailureOper", _ActiveDownloadFailureOper)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user