1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-11 12:46:49 +00:00

feat(operations): the Logs page's rows and expired sessions are removed

Nothing removed the Logs page's rows, which every action and every
failed login adds, or the database sessions past their expiry. The job
worker's housekeeping now deletes the rows older than Log Retention
Days, a new setting under Lists and pages (1-3650, 365 by default), and
the expired sessions.
This commit is contained in:
catborise 2026-11-05 09:40:44 +03:00
parent 93b420ae81
commit b2deb042e8
10 changed files with 243 additions and 173 deletions

View file

@ -51,7 +51,7 @@ TRANSPORT_ERROR_CODES = {
}
UNREACHABLE = gettext_noop("The host of this virtual machine cannot be reached right now.")
BOUNDS = {"WORKER_CONCURRENCY": (1, 16, 4), "JOB_RETENTION_DAYS": (1, 3650, 30)}
BOUNDS = {"WORKER_CONCURRENCY": (1, 16, 4), "JOB_RETENTION_DAYS": (1, 3650, 30), "LOG_RETENTION_DAYS": (1, 3650, 365)}
def safe_text(text):
@ -177,3 +177,7 @@ def concurrency():
def retention_days():
return _value("JOB_RETENTION_DAYS")
def log_retention_days():
return _value("LOG_RETENTION_DAYS")