Remove unused endpoint and fix stale slot retry problems

This commit is contained in:
Jack Kingsman
2026-03-12 17:33:53 -07:00
parent 7e1f941760
commit 338f632514
3 changed files with 39 additions and 1 deletions
+9
View File
@@ -306,6 +306,15 @@ class RadioManager:
self._channel_slot_by_key.move_to_end(normalized_key)
self._channel_key_by_slot[slot] = normalized_key
def invalidate_cached_channel_slot(self, channel_key: str) -> None:
"""Drop any cached slot assignment for a channel key."""
normalized_key = channel_key.upper()
slot = self._channel_slot_by_key.pop(normalized_key, None)
if slot is None:
return
if self._channel_key_by_slot.get(slot) == normalized_key:
self._channel_key_by_slot.pop(slot, None)
def get_channel_send_cache_snapshot(self) -> list[tuple[str, int]]:
"""Return the current channel send cache contents in LRU order."""
return list(self._channel_slot_by_key.items())
+4 -1
View File
@@ -112,7 +112,10 @@ async def send_channel_message_with_effective_scope(
msg=text,
timestamp=timestamp_bytes,
)
radio_manager.note_channel_slot_used(channel_key)
if send_result.type == EventType.ERROR:
radio_manager.invalidate_cached_channel_slot(channel_key)
else:
radio_manager.note_channel_slot_used(channel_key)
return send_result
finally:
if override_scope and override_scope != baseline_scope: