diff options
author | Valery Piashchynski <[email protected]> | 2020-11-09 15:11:10 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-09 15:11:10 +0300 |
commit | 0874bcb2f6b284a940ba4f3507eb8c4619c27868 (patch) | |
tree | c99d15624cd080cad22b7c8fb7d4714b2dc124fb /process_state.go | |
parent | 9fbe7726dd55cfedda724b7644e1b6bf7c1a6cb4 (diff) | |
parent | f218dcbd7e55d9ad1df8336e2331cdaa62d9ded3 (diff) |
Merge pull request #390 from spiral/feature/switch_to_spiral_errorsv2.0.0-alpha17
Feature/switch to spiral errors
Diffstat (limited to 'process_state.go')
-rwxr-xr-x | process_state.go | 4 |
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{ |