feat: add 'none' check method — node always appears online

This commit is contained in:
Pouzor
2026-03-08 00:41:17 +01:00
parent 2441d72b41
commit 627f67336f
3 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
"""Per-node status checks: ping, http, https, tcp, ssh, prometheus, health."""
"""Per-node status checks: ping, http, https, tcp, ssh, prometheus, health, none."""
import asyncio
import logging
import socket
@@ -15,6 +15,9 @@ async def check_node(check_method: str, target: str | None, ip: str | None) -> d
Run the appropriate check and return {status, response_time_ms}.
status is one of: online, offline, unknown.
"""
if check_method == "none":
return {"status": "online", "response_time_ms": None}
host = target or ip
if not host:
return {"status": "unknown", "response_time_ms": None}