summaryrefslogtreecommitdiff
path: root/worker.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-05-03 13:37:39 +0300
committerWolfy-J <[email protected]>2019-05-03 13:37:39 +0300
commite52c29d081a14f0ec4efb01da11c69215ea40a6a (patch)
tree52a54ed292bfb5e27ef950e598181de0f70d759a /worker.go
parent46519d2a383c9564007e1d2a6beb492988f8c6c9 (diff)
better worker removal mechanism
Diffstat (limited to 'worker.go')
-rw-r--r--worker.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/worker.go b/worker.go
index d476b918..fb55eb57 100644
--- a/worker.go
+++ b/worker.go
@@ -193,6 +193,10 @@ func (w *Worker) Exec(rqs *Payload) (rsp *Payload, err error) {
return rsp, err
}
+func (w *Worker) markDisabled() {
+ w.state.set(StateDisabled)
+}
+
func (w *Worker) start() error {
if err := w.cmd.Start(); err != nil {
close(w.waitDone)