From 671af01e0b2af24e5b10bb89b85b88309b558de2 Mon Sep 17 00:00:00 2001 From: pablorevilla-meshtastic Date: Thu, 14 May 2026 14:54:03 -0700 Subject: [PATCH] ADDED new cleanup to the keys table --- startdb.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/startdb.py b/startdb.py index 1ef461d..eeea280 100644 --- a/startdb.py +++ b/startdb.py @@ -213,6 +213,16 @@ async def daily_cleanup_at( ) cleanup_logger.info(f"Deleted {result.rowcount} rows from Traceroute") + # ------------------------- + # NodePublicKey + # ------------------------- + result = await session.execute( + delete(models.NodePublicKey).where( + models.NodePublicKey.last_seen_us < cutoff_us + ) + ) + cleanup_logger.info(f"Deleted {result.rowcount} rows from NodePublicKey") + # ------------------------- # Node # -------------------------