@@ -24,7 +24,7 @@ async def verify_node_backend_health(node: PasarGuardNode, node_name: str) -> He
2424 Verify node health by checking backend stats.
2525 Returns updated health status.
2626 """
27- current_health = await node .get_health ()
27+ current_health = await asyncio . wait_for ( node .get_health (), timeout = 10 )
2828
2929 # Skip nodes that are not connected or invalid
3030 if current_health in (Health .NOT_CONNECTED , Health .INVALID ):
@@ -55,8 +55,8 @@ 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 asyncio . wait_for ( node .get_backend_stats (), timeout = 20 )
59- node_version , core_version = await asyncio .wait_for (node .get_versions (), timeout = 20 )
58+ await node .get_backend_stats ()
59+ node_version , core_version = await asyncio .wait_for (node .get_versions (), timeout = 10 )
6060 async with GetDB () as db :
6161 await NodeOperation ._update_single_node_status (
6262 db ,
@@ -66,7 +66,7 @@ async def update_node_connection_status(node_id: int, node: PasarGuardNode):
6666 node_version = node_version ,
6767 )
6868 except asyncio .TimeoutError :
69- logger .warning (f"Node { node_id } connection status check timed out, will retry on next check" )
69+ logger .warning (f"Node { node_id } get versions timed out, will retry on next check" )
7070 return
7171 except NodeAPIError as e :
7272 if e .code > - 3 :
@@ -89,7 +89,7 @@ async def process_node_health_check(db_node: Node, node: PasarGuardNode):
8989 return
9090
9191 try :
92- health = await asyncio . wait_for ( verify_node_backend_health (node , db_node .name ), timeout = 20 )
92+ health = await verify_node_backend_health (node , db_node .name )
9393 except asyncio .TimeoutError :
9494 if db_node .status == NodeStatus .connected :
9595 logger .warning (
0 commit comments