summaryrefslogtreecommitdiff
path: root/worker.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-23 17:06:07 +0300
committerWolfy-J <[email protected]>2018-06-23 17:06:07 +0300
commit80bd89f91fd0055579717f3cc65b39176eb09000 (patch)
tree223e1980e580137b0b937cf6d8464aa59cc8733e /worker.go
parentddf2ce2ca7d90d6cddf7d49e973ea4ec17f8477a (diff)
realtime error handling and displaying
Diffstat (limited to 'worker.go')
-rw-r--r--worker.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/worker.go b/worker.go
index 811bda5f..d1612edd 100644
--- a/worker.go
+++ b/worker.go
@@ -1,7 +1,6 @@
package roadrunner
import (
- "bytes"
"fmt"
"github.com/pkg/errors"
"github.com/spiral/goridge"
@@ -24,7 +23,7 @@ type Worker struct {
Created time.Time
// state holds information about current worker state,
- // number of worker executions, last status change time.
+ // number of worker executions, buf status change time.
// publicly this object is receive-only and protected using Mutex
// and atomic counter.
state *state
@@ -60,7 +59,7 @@ func newWorker(cmd *exec.Cmd) (*Worker, error) {
w := &Worker{
Created: time.Now(),
cmd: cmd,
- err: &errBuffer{buffer: new(bytes.Buffer)},
+ err: newErrBuffer(),
waitDone: make(chan interface{}),
state: newState(StateInactive),
}