mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix: add all_profiles param + narrow exception handling
- add all_profiles=False to find_gateway_pids() and kill_gateway_processes() so hermes update and gateway stop --all can still discover processes across all profiles - narrow bare 'except Exception' to (OSError, subprocess.TimeoutExpired) - update test mocks to match new signatures
This commit is contained in:
parent
b80e318168
commit
d82580b25b
5 changed files with 28 additions and 15 deletions
|
|
@ -3876,7 +3876,7 @@ def cmd_update(args):
|
|||
# Exclude PIDs that belong to just-restarted services so we don't
|
||||
# immediately kill the process that systemd/launchd just spawned.
|
||||
service_pids = _get_service_pids()
|
||||
manual_pids = find_gateway_pids(exclude_pids=service_pids)
|
||||
manual_pids = find_gateway_pids(exclude_pids=service_pids, all_profiles=True)
|
||||
for pid in manual_pids:
|
||||
try:
|
||||
os.kill(pid, _signal.SIGTERM)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue