Translate the whole site to English: English routes with 301 redirects from the Dutch paths, English UI, docs, seeds and captions, one-time live content migration
This commit is contained in:
@@ -8,7 +8,7 @@ from molodetz.services.base import BaseService
|
||||
class HousekeepingService(BaseService):
|
||||
name = "housekeeping"
|
||||
title = "Housekeeping"
|
||||
description = "Ruimt verlopen sessies op en snoeit het auditlog volgens de bewaartermijn."
|
||||
description = "Clears expired sessions and prunes the audit log to the retention period."
|
||||
default_interval = 3600
|
||||
min_interval = 60
|
||||
metrics_interval = 300
|
||||
@@ -23,14 +23,14 @@ class HousekeepingService(BaseService):
|
||||
days = max(1, get_int_setting("audit_retention_days", 365))
|
||||
cutoff = (datetime.now(timezone.utc) - timedelta(days=days)).isoformat()
|
||||
self.last_audit = prune_audit(cutoff)
|
||||
self.log(f"sessies verwijderd: {self.last_sessions}, auditregels gesnoeid: {self.last_audit}")
|
||||
self.log(f"sessions removed: {self.last_sessions}, audit rows pruned: {self.last_audit}")
|
||||
|
||||
def collect_metrics(self):
|
||||
return {
|
||||
"cards": [
|
||||
{"label": "Auditregels", "value": count_audit()},
|
||||
{"label": "Laatste sessie-opruiming", "value": self.last_sessions},
|
||||
{"label": "Laatste auditsnoei", "value": self.last_audit},
|
||||
{"label": "Audit rows", "value": count_audit()},
|
||||
{"label": "Last session cleanup", "value": self.last_sessions},
|
||||
{"label": "Last audit prune", "value": self.last_audit},
|
||||
],
|
||||
"table": None,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user