feat(webui): connect to existing remote nanobot instances (NAN-157)
This commit is contained in:
1 parent
6ecb74aea9
commit
11889c018e
34 files changed
+4074
-14
No files matched your search
@@ -676,6 +676,7 @@ class WebSocketChannel(BaseChannel):
|
||||
)
|
||||
|
||||
async def start(self) -> None:
|
||||
self.gateway.http.remote_instances.resume()
|
||||
from nanobot.utils.logging_bridge import redirect_lib_logging
|
||||
|
||||
redirect_lib_logging("websockets", level="WARNING")
|
||||
@@ -880,6 +881,7 @@ class WebSocketChannel(BaseChannel):
|
||||
# -- Outbound WebSocket events -----------------------------------------
|
||||
|
||||
async def stop(self) -> None:
|
||||
await self.gateway.http.remote_instances.close()
|
||||
server_task = self._server_task
|
||||
if (
|
||||
not self._running
|
||||
|
||||
@@ -45,6 +45,7 @@ def _channel() -> WebSocketChannel:
|
||||
gateway = MagicMock()
|
||||
gateway.session_manager = None
|
||||
gateway.http.settings_routes.close = AsyncMock()
|
||||
gateway.http.remote_instances.close = AsyncMock()
|
||||
return WebSocketChannel(
|
||||
{"enabled": True, "allowFrom": ["*"]},
|
||||
MessageBus(),
|
||||
|
||||
Reference in new issue
Block a user