Skip to content

Commit 8943988

Browse files
committed
fix: node_health_check condition
1 parent c76a075 commit 8943988

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/jobs/node_checker.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ async def check_health(db_node: Node, node: PasarGuardNode):
4343
if db_node.status in (NodeStatus.connecting, NodeStatus.error) and health is Health.HEALTHY:
4444
await node_operator.update_node_status(db_node.id, NodeStatus.connected)
4545

46-
elif db_node.status in (NodeStatus.connecting, NodeStatus.error) and health is Health.NOT_CONNECTED:
46+
elif db_node.status in (NodeStatus.connecting, NodeStatus.error) and health in (
47+
Health.NOT_CONNECTED,
48+
Health.BROKEN,
49+
):
4750
await node_operator.connect_node(node_id=db_node.id)
4851

4952
elif db_node.status == NodeStatus.connected and health is not Health.HEALTHY:

0 commit comments

Comments
 (0)