Skip to content

Commit fa35932

Browse files
committed
feat(node): hard reset support
1 parent b01c9f2 commit fa35932

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

app/jobs/node_checker.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,18 @@ async def update_node_connection_status(node_id: int, node: PasarGuardNode):
6868
async def process_node_health_check(db_node: Node, node: PasarGuardNode):
6969
"""
7070
Process health check for a single node:
71-
1. Verify backend health
72-
2. Compare with database status
73-
3. Update status if needed
71+
1. Check if node requires hard reset
72+
2. Verify backend health
73+
3. Compare with database status
74+
4. Update status if needed
7475
"""
7576
if node is None:
7677
return
7778

79+
if node.requires_hard_reset():
80+
await node_operator.connect_node(db_node.id)
81+
return
82+
7883
try:
7984
health = await asyncio.wait_for(verify_node_backend_health(node, db_node.name), timeout=15)
8085
except asyncio.TimeoutError:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ dependencies = [
4444
"uvloop>=0.21.0; sys_platform != 'win32'",
4545
"aiorwlock>=1.5.0",
4646
"typer>=0.17.3",
47-
"pasarguard-node-bridge>=0.0.61",
47+
"pasarguard-node-bridge>=0.0.62",
4848
]
4949

5050
[tool.ruff]

uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)