mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-08-07 01:13:11 +02:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user