Skip to content

Commit cbb54de

Browse files
authored
Remove waiting for all nodes to be ready logic from dump (#68)
1 parent 817f7cb commit cbb54de

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

zwave_js_server/dump.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ async def dump_msgs(
99
url: str,
1010
session: aiohttp.ClientSession,
1111
timeout: Optional[float] = None,
12-
wait_nodes_ready: bool = True,
1312
) -> List[dict]:
1413
"""Dump server state."""
1514
client = await session.ws_connect(url)
@@ -21,22 +20,6 @@ async def dump_msgs(
2120
await client.send_json({"command": "start_listening"})
2221
msg = await client.receive_json()
2322
msgs.append(msg)
24-
state = msg["result"]["state"]
25-
26-
# If it's None, old version of the server, ignore it.
27-
if wait_nodes_ready and state.get("driver", {}).get("allNodesReady") is False:
28-
# Wait for nodes ready event and refetch state
29-
while True:
30-
msg = await client.receive_json()
31-
msgs.append(msg)
32-
if not (
33-
msg["type"] == "event"
34-
and msg["event"] == {"source": "driver", "event": "all nodes ready"}
35-
):
36-
continue
37-
38-
await client.close()
39-
return await dump_msgs(url, session, timeout)
4023

4124
if timeout is None:
4225
await client.close()

0 commit comments

Comments
 (0)