diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-07-25 22:26:09 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-07-25 22:26:09 -0700 |
commit | 861a873f7ecf455b9c7833040b2a8163e369e062 (patch) | |
tree | 311d384ed52cb04822b59cf7f6c416e191d80f44 /continuedev/src | |
parent | f0df0fdc1fb7d8e65e27abe633da1831b8172b35 (diff) | |
download | sncontinue-861a873f7ecf455b9c7833040b2a8163e369e062.tar.gz sncontinue-861a873f7ecf455b9c7833040b2a8163e369e062.tar.bz2 sncontinue-861a873f7ecf455b9c7833040b2a8163e369e062.zip |
checkpoint. Somewhat working, just a bit slow, probably some blocking meilisearch calls still happening
Diffstat (limited to 'continuedev/src')
-rw-r--r-- | continuedev/src/continuedev/server/gui.py | 4 | ||||
-rw-r--r-- | continuedev/src/continuedev/server/ide.py | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/continuedev/src/continuedev/server/gui.py b/continuedev/src/continuedev/server/gui.py index fa203c28..c0957395 100644 --- a/continuedev/src/continuedev/server/gui.py +++ b/continuedev/src/continuedev/server/gui.py @@ -61,12 +61,12 @@ class GUIProtocolServer(AbstractGUIProtocolServer): "data": data }) - async def _receive_json(self, message_type: str, timeout: int = 5) -> Any: + async def _receive_json(self, message_type: str, timeout: int = 20) -> Any: try: return await asyncio.wait_for(self.sub_queue.get(message_type), timeout=timeout) except asyncio.TimeoutError: raise Exception( - "GUI Protocol _receive_json timed out after 5 seconds") + "GUI Protocol _receive_json timed out after 20 seconds") async def _send_and_receive_json(self, data: Any, resp_model: Type[T], message_type: str) -> T: await self._send_json(message_type, data) diff --git a/continuedev/src/continuedev/server/ide.py b/continuedev/src/continuedev/server/ide.py index d6a28c92..3401cbac 100644 --- a/continuedev/src/continuedev/server/ide.py +++ b/continuedev/src/continuedev/server/ide.py @@ -139,6 +139,7 @@ class IdeProtocolServer(AbstractIdeProtocolServer): continue message_type = message["messageType"] data = message["data"] + print("Received message while initializing", message_type) if message_type == "workspaceDirectory": self.workspace_directory = data["workspaceDirectory"] elif message_type == "uniqueId": @@ -153,17 +154,18 @@ class IdeProtocolServer(AbstractIdeProtocolServer): async def _send_json(self, message_type: str, data: Any): if self.websocket.application_state == WebSocketState.DISCONNECTED: return + print("Sending IDE message: ", message_type) await self.websocket.send_json({ "messageType": message_type, "data": data }) - async def _receive_json(self, message_type: str, timeout: int = 5) -> Any: + async def _receive_json(self, message_type: str, timeout: int = 20) -> Any: try: return await asyncio.wait_for(self.sub_queue.get(message_type), timeout=timeout) except asyncio.TimeoutError: raise Exception( - "IDE Protocol _receive_json timed out after 5 seconds") + "IDE Protocol _receive_json timed out after 20 seconds", message_type) async def _send_and_receive_json(self, data: Any, resp_model: Type[T], message_type: str) -> T: await self._send_json(message_type, data) |