refactor(airtime): introduce refresh_radio_params method for dynamic modulation updates

Added a new method to the AirtimeManager class to refresh modulation parameters without clearing transmission history. Updated ConfigManager to call this method after applying live radio configurations. Enhanced tests to verify that modulation updates occur correctly during live updates.
This commit is contained in:
agessaman
2026-07-17 17:38:11 -07:00
parent b11d4972ff
commit 2432332f87
11 changed files with 236 additions and 19 deletions
+9 -1
View File
@@ -2351,7 +2351,15 @@ class SQLiteHandler:
logger.error(f"Failed to vacuum database: {e}")
raise
def cleanup_old_data(self, days: int = 7):
def cleanup_old_data(self, days: int = 7, companion_events_days: Optional[int] = None):
"""Prune retention-bounded tables.
``companion_events_days`` is forwarded from engine.py
(``storage.retention.companion_events_days``, default 31). Accepted here
so the periodic cleanup call cannot TypeError and silently skip all
SQLite pruning. Companion journal/history pruning is layered on by the
companion-api storage work once those tables exist.
"""
try:
cutoff = time.time() - (days * 24 * 3600)