fix(hermes): wait for Herdr socket before cleanup
Some checks failed
Tests / Declarative: Post Actions failed: 2, passed: 204
Some checks failed
Tests / Declarative: Post Actions failed: 2, passed: 204
This commit is contained in:
parent
ce96717b25
commit
f457b89e9e
@ -511,16 +511,23 @@ spec:
|
||||
herdr server &
|
||||
server_pid=$!
|
||||
trap 'kill "${server_pid}" 2>/dev/null || true' TERM INT
|
||||
agent_payload=
|
||||
for attempt in $(seq 1 60); do
|
||||
if herdr status server >/dev/null 2>&1; then break; fi
|
||||
candidate="$(/opt/data/tools/bin/herdr agent list 2>/dev/null || true)"
|
||||
if printf '%s' "${candidate}" | /opt/hermes/.venv/bin/python -c \
|
||||
'import json, sys; json.load(sys.stdin)' 2>/dev/null; then
|
||||
agent_payload="${candidate}"
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
legacy_hermes_panes="$(/opt/data/tools/bin/herdr agent list | \
|
||||
legacy_hermes_panes="$(printf '%s' "${agent_payload}" | \
|
||||
/opt/hermes/.venv/bin/python -c '
|
||||
import json
|
||||
import sys
|
||||
|
||||
payload = json.load(sys.stdin)
|
||||
raw = sys.stdin.read().strip()
|
||||
payload = json.loads(raw) if raw else {}
|
||||
for agent in payload.get("result", {}).get("agents", []):
|
||||
if agent.get("agent") == "hermes" and agent.get("pane_id"):
|
||||
print(agent["pane_id"])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user