@@ -31,7 +31,7 @@ async def verify_node_backend_health(node: PasarGuardNode, node_name: str) -> He
3131 return current_health
3232
3333 try :
34- await asyncio . wait_for ( node .get_backend_stats (), timeout = 10 )
34+ await node .get_backend_stats ()
3535 if current_health != Health .HEALTHY :
3636 await node .set_health (Health .HEALTHY )
3737 logger .debug (f"[{ node_name } ] Node health is HEALTHY" )
@@ -55,15 +55,14 @@ async def update_node_connection_status(node_id: int, node: PasarGuardNode):
5555 Update node connection status by getting backend stats and version info.
5656 """
5757 try :
58- await node .get_backend_stats (timeout = 8 )
59- xray_version = await node .core_version ()
60- node_version = await node .node_version ()
58+ await node .get_backend_stats ()
59+ node_version , core_version = await node .get_versions ()
6160 async with GetDB () as db :
6261 await NodeOperation ._update_single_node_status (
6362 db ,
6463 node_id ,
6564 NodeStatus .connected ,
66- xray_version = xray_version ,
65+ xray_version = core_version ,
6766 node_version = node_version ,
6867 )
6968 except NodeAPIError as e :
@@ -98,11 +97,9 @@ async def process_node_health_check(db_node: Node, node: PasarGuardNode):
9897 await NodeOperation ._update_single_node_status (
9998 db , db_node .id , NodeStatus .error , message = "Health check timeout"
10099 )
101- return
102100 except NodeAPIError as e :
103101 async with GetDB () as db :
104102 await NodeOperation ._update_single_node_status (db , db_node .id , NodeStatus .error , message = e .detail )
105- return
106103
107104 # Skip nodes that are already healthy and connected
108105 if health == Health .HEALTHY and db_node .status == NodeStatus .connected :
@@ -111,12 +108,13 @@ async def process_node_health_check(db_node: Node, node: PasarGuardNode):
111108 # Update status for recovering nodes
112109 if db_node .status in (NodeStatus .connecting , NodeStatus .error ) and health == Health .HEALTHY :
113110 async with GetDB () as db :
111+ node_version , core_version = await node .get_versions ()
114112 await NodeOperation ._update_single_node_status (
115113 db ,
116114 db_node .id ,
117115 NodeStatus .connected ,
118- xray_version = await node . core_version () ,
119- node_version = await node . node_version () ,
116+ xray_version = await core_version ,
117+ node_version = await node_version ,
120118 )
121119 return
122120
0 commit comments