dd
This commit is contained in:
@@ -122,7 +122,11 @@ def register_node_heartbeat(
|
||||
current_load: int = 0,
|
||||
worker_version: str = "0.1.0",
|
||||
metadata: dict | None = None,
|
||||
hostname_override: str | None = None,
|
||||
ip_override: str | None = None,
|
||||
) -> None:
|
||||
hostname = str(hostname_override or "").strip() or socket.gethostname()
|
||||
ip = str(ip_override or "").strip() or _resolve_local_ip()
|
||||
with get_db() as conn:
|
||||
with conn.cursor() as cur:
|
||||
cur.execute(
|
||||
@@ -146,8 +150,8 @@ def register_node_heartbeat(
|
||||
node_code,
|
||||
region,
|
||||
role,
|
||||
socket.gethostname(),
|
||||
_resolve_local_ip(),
|
||||
hostname,
|
||||
ip,
|
||||
status,
|
||||
worker_version,
|
||||
max(0, int(current_load or 0)),
|
||||
|
||||
Reference in New Issue
Block a user