summaryrefslogtreecommitdiff
path: root/pool.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-01-28 14:35:07 +0300
committerWolfy-J <[email protected]>2018-01-28 14:35:07 +0300
commitc57232ae2bc7253ded326226948dfc7f9b324753 (patch)
treea7710545a75f9ecf483618ff742f55ed8a0d5fae /pool.go
parente4e5cadce7deef4c36c038a4900d55ea30dd099c (diff)
golint
Diffstat (limited to 'pool.go')
-rw-r--r--pool.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pool.go b/pool.go
index 21637bef..ec508c93 100644
--- a/pool.go
+++ b/pool.go
@@ -10,8 +10,8 @@ import (
)
const (
- // Control header to be made by worker to request termination.
- TerminateRequest = "{\"terminate\": true}"
+ // StopRequest can be sent by worker to indicate that restart is required.
+ StopRequest = "{\"stop\": true}"
)
// Pool controls worker creation, destruction and task routing.
@@ -123,7 +123,7 @@ func (p *Pool) Exec(rqs *Payload) (rsp *Payload, err error) {
}
// worker want's to be terminated
- if rsp.Body == nil && rsp.Head != nil && string(rsp.Head) == TerminateRequest {
+ if rsp.Body == nil && rsp.Head != nil && string(rsp.Head) == StopRequest {
go p.replaceWorker(w, err)
return p.Exec(rqs)
}