From 2eed81d8fdbf8ee5134bb3b3f4c11c63cf6d757c Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 13 Jan 2021 13:56:40 +0300 Subject: Add IdleTTL test Add removed state to the worker before it being removed --- pkg/worker_watcher/worker_watcher.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pkg/worker_watcher/worker_watcher.go') 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 } -- cgit v1.2.3