summaryrefslogtreecommitdiff
path: root/process_state.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-11-09 14:26:32 +0300
committerValery Piashchynski <[email protected]>2020-11-09 14:26:32 +0300
commitb7b533dbe13d2c1a8e78c0e33a4a388c56884440 (patch)
treed915b68d0394e249ead23501f5a043e256115c5f /process_state.go
parente3a1669c8168320318291325f70ca35e2ab2eec3 (diff)
CI update
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{