labels and automatizations
This commit is contained in:
@@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from datetime import datetime, timedelta, timezone
|
||||
|
||||
from ..config import JOBS_RETENTION_DAYS, LOG_RETENTION_DAYS, SMART_QUEUE_HISTORY_RETENTION_DAYS, TRAFFIC_HISTORY_RETENTION_DAYS
|
||||
from ..config import AUTOMATION_HISTORY_RETENTION_DAYS, JOBS_RETENTION_DAYS, LOG_RETENTION_DAYS, SMART_QUEUE_HISTORY_RETENTION_DAYS, TRAFFIC_HISTORY_RETENTION_DAYS
|
||||
from ..db import connect
|
||||
|
||||
_LAST_CLEANUP = 0.0
|
||||
@@ -30,6 +30,7 @@ def cleanup(force: bool = False) -> dict[str, int]:
|
||||
targets = {
|
||||
"traffic_history": ("created_at", TRAFFIC_HISTORY_RETENTION_DAYS),
|
||||
"smart_queue_history": ("created_at", SMART_QUEUE_HISTORY_RETENTION_DAYS),
|
||||
"automation_history": ("created_at", AUTOMATION_HISTORY_RETENTION_DAYS),
|
||||
"jobs": ("updated_at", JOBS_RETENTION_DAYS),
|
||||
"logs": ("created_at", LOG_RETENTION_DAYS),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user