mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-05-05 04:52:59 +02:00
Pause autofetch during poll loop
This commit is contained in:
@@ -315,6 +315,7 @@ async def _message_poll_loop():
|
||||
async with radio_manager.radio_operation(
|
||||
"message_poll_loop",
|
||||
blocking=False,
|
||||
suspend_auto_fetch=True,
|
||||
) as mc:
|
||||
await poll_for_messages(mc)
|
||||
except RadioOperationBusyError:
|
||||
|
||||
@@ -843,6 +843,8 @@ def _make_connected_manager() -> tuple[RadioManager, MagicMock]:
|
||||
rm = RadioManager()
|
||||
mock_mc = MagicMock(name="lock_scoped_mc")
|
||||
mock_mc.is_connected = True
|
||||
mock_mc.stop_auto_message_fetching = AsyncMock()
|
||||
mock_mc.start_auto_message_fetching = AsyncMock()
|
||||
rm._meshcore = mock_mc
|
||||
return rm, mock_mc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user