diff options
author | Valery Piashchynski <[email protected]> | 2021-01-13 13:56:40 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-01-13 13:56:40 +0300 |
commit | 2eed81d8fdbf8ee5134bb3b3f4c11c63cf6d757c (patch) | |
tree | 362f0eacdf2373bf208441577c1e69b8337bd71e /pkg/worker_watcher | |
parent | 581bb5370c89d749b77209b841fec30544c16246 (diff) |
Add IdleTTL test
Add removed state to the worker before it being removed
Diffstat (limited to 'pkg/worker_watcher')
-rwxr-xr-x | pkg/worker_watcher/worker_watcher.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/worker_watcher/worker_watcher.go b/pkg/worker_watcher/worker_watcher.go index 348f0459..127dc801 100755 --- a/pkg/worker_watcher/worker_watcher.go +++ b/pkg/worker_watcher/worker_watcher.go @@ -236,7 +236,7 @@ func (ww *workerWatcher) RemoveWorker(wb worker.BaseProcess) error { pid := wb.Pid() if ww.stack.FindAndRemoveByPid(pid) { - wb.State().Set(internal.StateInvalid) + wb.State().Set(internal.StateRemove) err := wb.Kill() if err != nil { return errors.E(op, err) @@ -244,7 +244,6 @@ func (ww *workerWatcher) RemoveWorker(wb worker.BaseProcess) error { return nil } - wb.State().Set(internal.StateRemove) return nil } |