refactor(download): 移除下载后自动删除逻辑,保留手动删除接口

1. download.py:
   - 完全移除 _mark_task_downloaded() 函数(原功能:下载后设置 delete_after_at
     触发 janitor 到期自动清理文件)
   - 改为仅记录 downloaded_at 时间戳,不再调度自动删除
   - 手动 DELETE /task/<id> 接口不受影响(tasks.py:151-211)

2. gasflux.ini:
   - successful_task_cleanup_age: 60 → 315360000(10年)
     彻底禁止 janitor 的下载后自动清理行为
This commit is contained in:
DXC
2026-07-10 16:20:49 +08:00
parent fa0cd769a8
commit 9898b68410
2 changed files with 12 additions and 38 deletions

View File

@ -30,7 +30,7 @@ task_cleanup_interval = 30
# 24 hours in seconds
max_task_age = 86400
# 1 minute in seconds for successful tasks
successful_task_cleanup_age = 60
successful_task_cleanup_age = 315360000
# 1 minute in seconds for failed tasks
failed_task_cleanup_age = 60
janitor_dry_run = false