diff options
author | Valery Piashchynski <[email protected]> | 2020-11-25 23:11:35 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-11-25 23:11:35 +0300 |
commit | dd224cf8616d2196150fb7a64397eb1a9567e11b (patch) | |
tree | c220ccbd908c78bfb682ef23af35c68e109f6752 /state.go | |
parent | 1b0b033bcf4969e401b0c34b82171aa0b60b12cf (diff) |
Finish tests for the http plugin
Diffstat (limited to 'state.go')
-rwxr-xr-x | state.go | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -11,18 +11,17 @@ type State interface { // Value returns state value Value() int64 + // Set sets the state Set(value int64) - // NumJobs shows how many times WorkerProcess was invoked NumExecs() int64 - // IsActive returns true if WorkerProcess not Inactive or Stopped IsActive() bool - + // RegisterExec using to registering php executions RegisterExec() - + // SetLastUsed sets worker last used time SetLastUsed(lu uint64) - + // LastUsed return worker last used time LastUsed() uint64 } @@ -100,8 +99,8 @@ func (s *state) Value() int64 { // IsActive returns true if WorkerProcess not Inactive or Stopped func (s *state) IsActive() bool { - state := s.Value() - return state == StateWorking || state == StateReady + val := s.Value() + return val == StateWorking || val == StateReady } // change state value (status) |