feat(scheduler): 下载失败冷却记录加入定时清理

新增 DATA_CLEANUP_DOWNLOAD_FAILURE_DAYS 配置项(默认 7 天),
在 _build_cleanup_plans 中增加 downloadfailure 清理计划,
调用已有的 DownloadFailure.delete_expired 删除冷却已过期的记录。
This commit is contained in:
jxxghp
2026-08-17 13:29:42 +08:00
parent 2bb090d2be
commit 48d85b798b
2 changed files with 19 additions and 0 deletions
+2
View File
@@ -194,6 +194,8 @@ class ConfigModel(BaseModel):
DATA_CLEANUP_SITE_USERDATA_DAYS: int = 180
# 整理历史表保留天数,0为不清理
DATA_CLEANUP_TRANSFER_HISTORY_DAYS: int = 365 * 3
# 下载失败冷却记录保留天数,0为不清理
DATA_CLEANUP_DOWNLOAD_FAILURE_DAYS: int = 7
# ==================== 缓存配置 ====================
# 缓存类型,支持 cachetools 和 redis,默认使用 cachetools