Add support for timeout
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
This commit is contained in:
parent
5c1adcbf6a
commit
78ecdcd298
2 changed files with 84 additions and 14 deletions
|
@ -597,13 +597,13 @@ func (s *Server) ExecSync(ctx context.Context, req *pb.ExecSyncRequest) (*pb.Exe
|
|||
return nil, fmt.Errorf("exec command cannot be empty")
|
||||
}
|
||||
|
||||
out, errout, rc, err := s.runtime.ExecSync(c, cmd, req.GetTimeout())
|
||||
|
||||
execResp, err := s.runtime.ExecSync(c, cmd, req.GetTimeout())
|
||||
resp := &pb.ExecSyncResponse{
|
||||
Stdout: out,
|
||||
Stderr: errout,
|
||||
ExitCode: &rc,
|
||||
Stdout: execResp.Stdout,
|
||||
Stderr: execResp.Stderr,
|
||||
ExitCode: &execResp.ExitCode,
|
||||
}
|
||||
|
||||
logrus.Debugf("ExecSyncResponse: %+v", resp)
|
||||
return resp, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue