release: nexus btpanel session fix and app-v2

This commit is contained in:
Codex Release Bot
2026-07-08 22:31:31 +08:00
commit 1933f0af6e
2457 changed files with 350105 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
"""alert_logs retention purge helpers."""
from datetime import datetime, timedelta, timezone
from server.infrastructure.database.alert_log_repo import (
ALERT_LOG_PURGE_BATCH_SIZE,
ALERT_LOG_RETENTION_DAYS,
)
def test_alert_log_retention_constants():
assert ALERT_LOG_RETENTION_DAYS == 7
assert ALERT_LOG_PURGE_BATCH_SIZE >= 100
def test_purge_cutoff_is_7_days_ago():
cutoff = datetime.now(timezone.utc).replace(tzinfo=None) - timedelta(
days=ALERT_LOG_RETENTION_DAYS
)
age = datetime.now(timezone.utc).replace(tzinfo=None) - cutoff
assert age.days == ALERT_LOG_RETENTION_DAYS