feat: 历史归档按名称默认只保留最近7天
This commit is contained in:
@@ -62,6 +62,7 @@ class Settings:
|
||||
|
||||
keep_outputs: int = 48
|
||||
keep_runs: int = 2000
|
||||
history_keep_days: int = 7
|
||||
|
||||
def uses_metrix_api(self) -> bool:
|
||||
return self.storage_mode == "metrix" or self.database_mode == "metrix"
|
||||
@@ -117,6 +118,7 @@ def validate(data: dict[str, Any], current: Settings) -> Settings:
|
||||
"table_name": _identifier(merged, "table_name"),
|
||||
"keep_outputs": _int(merged, "keep_outputs", 1, 1000),
|
||||
"keep_runs": _int(merged, "keep_runs", 50, 100000),
|
||||
"history_keep_days": _int(merged, "history_keep_days", 0, 3650),
|
||||
}
|
||||
settings = Settings(**values)
|
||||
if settings.schedule_mode == "cron":
|
||||
|
||||
Reference in New Issue
Block a user