mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-10 03:22:05 +00:00
fix(gateway): cap adapter disconnect during stop
This commit is contained in:
parent
524cbabd89
commit
dccf1fb6e0
4 changed files with 79 additions and 2 deletions
|
|
@ -2387,7 +2387,15 @@ def systemd_stop(system: bool = False):
|
|||
write_planned_stop_marker(pid)
|
||||
except Exception:
|
||||
pass
|
||||
_run_systemctl(["stop", get_service_name()], system=system, check=True, timeout=90)
|
||||
try:
|
||||
_run_systemctl(["stop", get_service_name()], system=system, check=True, timeout=90)
|
||||
except subprocess.TimeoutExpired:
|
||||
label = _service_scope_label(system)
|
||||
print(
|
||||
f"Gateway {label} service is still stopping after 90s; "
|
||||
"check `hermes gateway status` or logs for final shutdown state."
|
||||
)
|
||||
return
|
||||
print(f"✓ {_service_scope_label(system).capitalize()} service stopped")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue