summaryrefslogtreecommitdiff
path: root/state.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-11-25 23:11:35 +0300
committerValery Piashchynski <[email protected]>2020-11-25 23:11:35 +0300
commitdd224cf8616d2196150fb7a64397eb1a9567e11b (patch)
treec220ccbd908c78bfb682ef23af35c68e109f6752 /state.go
parent1b0b033bcf4969e401b0c34b82171aa0b60b12cf (diff)
Finish tests for the http plugin
Diffstat (limited to 'state.go')
-rwxr-xr-xstate.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/state.go b/state.go
index 91c29946..45e90f96 100755
--- a/state.go
+++ b/state.go
@@ -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)