diff options
author | Valery Piashchynski <[email protected]> | 2021-01-21 16:08:06 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-01-21 16:08:06 +0300 |
commit | 8029e2d1107e4663f1104ebf25c40f252c8ea111 (patch) | |
tree | 7c9a6744fa9ce130d80c634da3d7596f70fda51a /pkg | |
parent | 7da6c78449776e1f3c6716250bca0b712a0423a4 (diff) |
Fix headers configs
Update rr.yaml
Remove previous stderr messages when they were sent
Diffstat (limited to 'pkg')
-rwxr-xr-x | pkg/worker/worker.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/worker/worker.go b/pkg/worker/worker.go index 4d4ca09b..bf70d646 100755 --- a/pkg/worker/worker.go +++ b/pkg/worker/worker.go @@ -79,6 +79,7 @@ type Process struct { // InitBaseWorker creates new Process over given exec.cmd. func InitBaseWorker(cmd *exec.Cmd, options ...Options) (worker.BaseProcess, error) { + const op = errors.Op("init_base_worker") if cmd.Process != nil { return nil, fmt.Errorf("can't attach to running process") } @@ -307,9 +308,10 @@ func (w *Process) watch() { n, _ := w.rd.Read(*buf) w.events.Push(events.WorkerEvent{Event: events.EventWorkerLog, Worker: w, Payload: (*buf)[:n]}) w.mu.Lock() + // delete all prev messages + w.stderr.Reset() // write new message w.stderr.Write((*buf)[:n]) - w.stderr.Reset() w.mu.Unlock() w.put(buf) } |