Skip to content

Commit

Permalink
Fix payload debug hung job (#1173)
Browse files Browse the repository at this point in the history
  • Loading branch information
matoval authored Oct 17, 2024
1 parent 2a415c4 commit 2e02922
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/workceptor/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ func commandRunner(command string, params string, unitdir string) error {
}
var payload string
reader := bufio.NewReader(stdin)
if err != nil {
return err
}

for {
response, err := reader.ReadString('\n')
Expand All @@ -144,6 +141,7 @@ func commandRunner(command string, params string, unitdir string) error {

MainInstance.nc.GetLogger().DebugPayload(payloadDebug, payload, workUnitID, "")
io.WriteString(stdinStream, payload)
stdinStream.Close()
} else {
cmd.Stdin = stdin
}
Expand Down

0 comments on commit 2e02922

Please sign in to comment.