feat: auto cleanup with retention period, storage limit, settings UI
This commit is contained in:
@@ -109,3 +109,23 @@ class DownloadLogListResponse(BaseModel):
|
||||
total: int
|
||||
page: int
|
||||
page_size: int
|
||||
|
||||
|
||||
class CleanupConfig(BaseModel):
|
||||
enabled: bool = True
|
||||
retention_minutes: int = 10080 # 7 days
|
||||
storage_limit_pct: int = 80
|
||||
|
||||
|
||||
class DiskStats(BaseModel):
|
||||
total: int
|
||||
used: int
|
||||
free: int
|
||||
used_pct: float
|
||||
|
||||
|
||||
class CleanupStatus(BaseModel):
|
||||
config: CleanupConfig
|
||||
disk: DiskStats
|
||||
last_run: str = ""
|
||||
last_result: dict = {}
|
||||
|
||||
Reference in New Issue
Block a user