중지된 프로세스는 목록에서 제거

This commit is contained in:
2023-05-22 15:39:19 +09:00
parent ac7902e7ae
commit 0f7b5c22fc

View File

@ -202,13 +202,16 @@ func NewClient(grpcAddr string, httpAddr string) (HoustonClient, error) {
return
case exited := <-exitChan:
var newprocs []*procmeta
for _, proc := range hc.childProcs {
if proc.cmd == exited && proc.state != protos.ProcessState_Stopped {
proc.state = protos.ProcessState_Stopped
op.Refresh(ctx, hc.makeOperationQueryRequest())
break
} else {
newprocs = append(newprocs, proc)
}
}
hc.childProcs = newprocs
op.Refresh(ctx, hc.makeOperationQueryRequest())
case resp := <-operationChan:
switch shared.Operation(resp.Operation) {