summaryrefslogtreecommitdiff
path: root/process_state.go
diff options
context:
space:
mode:
Diffstat (limited to 'process_state.go')
-rwxr-xr-xprocess_state.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/process_state.go b/process_state.go
index 1a4c4d65..1291a904 100755
--- a/process_state.go
+++ b/process_state.go
@@ -2,6 +2,7 @@ package roadrunner
import (
"github.com/shirou/gopsutil/process"
+ "github.com/spiral/errors"
)
// ProcessState provides information about specific worker.
@@ -25,10 +26,11 @@ type ProcessState struct {
// WorkerProcessState creates new worker state definition.
func WorkerProcessState(w WorkerBase) (ProcessState, error) {
+ const op = errors.Op("worker_process state")
p, _ := process.NewProcess(int32(w.Pid()))
i, err := p.MemoryInfo()
if err != nil {
- return ProcessState{}, err
+ return ProcessState{}, errors.E(op, err)
}
return ProcessState{