summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/util/table.go4
-rw-r--r--state.go8
-rw-r--r--static_pool.go4
-rw-r--r--worker.go4
4 files changed, 10 insertions, 10 deletions
diff --git a/cmd/util/table.go b/cmd/util/table.go
index 4fa05ae2..c0e20837 100644
--- a/cmd/util/table.go
+++ b/cmd/util/table.go
@@ -40,8 +40,8 @@ func renderStatus(status string) string {
return Sprintf("<cyan>ready</reset>")
case "working":
return Sprintf("<green>working</reset>")
- case "disabled":
- return Sprintf("<yellow>disabled</reset>")
+ case "invalid":
+ return Sprintf("<yellow>invalid</reset>")
case "stopped":
return Sprintf("<red>stopped</reset>")
case "errored":
diff --git a/state.go b/state.go
index a5bd4397..bf88f012 100644
--- a/state.go
+++ b/state.go
@@ -26,8 +26,8 @@ const (
// StateWorking - working on given payload.
StateWorking
- // StateDisabled - indicates that worker is being disabled and will be removed.
- StateDisabled
+ // StateInvalid - indicates that worker is being disabled and will be removed.
+ StateInvalid
// StateStopping - process is being softly stopped.
StateStopping
@@ -57,8 +57,8 @@ func (s *state) String() string {
return "ready"
case StateWorking:
return "working"
- case StateDisabled:
- return "disabled"
+ case StateInvalid:
+ return "invalid"
case StateStopped:
return "stopped"
case StateErrored:
diff --git a/static_pool.go b/static_pool.go
index fa4ac027..5f60099a 100644
--- a/static_pool.go
+++ b/static_pool.go
@@ -173,7 +173,7 @@ func (p *StaticPool) Destroy() {
var wg sync.WaitGroup
for _, w := range p.Workers() {
wg.Add(1)
- w.markDisabled()
+ w.markInvalid()
go func(w *Worker) {
defer wg.Done()
p.destroyWorker(w, nil)
@@ -283,7 +283,7 @@ func (p *StaticPool) createWorker() (*Worker, error) {
// gentry remove worker
func (p *StaticPool) discardWorker(w *Worker, caused interface{}) {
- w.markDisabled()
+ w.markInvalid()
go p.destroyWorker(w, caused)
}
diff --git a/worker.go b/worker.go
index fb55eb57..88fd1b9b 100644
--- a/worker.go
+++ b/worker.go
@@ -193,8 +193,8 @@ func (w *Worker) Exec(rqs *Payload) (rsp *Payload, err error) {
return rsp, err
}
-func (w *Worker) markDisabled() {
- w.state.set(StateDisabled)
+func (w *Worker) markInvalid() {
+ w.state.set(StateInvalid)
}
func (w *Worker) start() error {