diff options
author | Valery Piashchynski <[email protected]> | 2021-02-02 19:30:00 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-02 19:30:00 +0300 |
commit | 20a1a5d2eb26090e0eef0e6772330ee2a52526fa (patch) | |
tree | c282e18c20029f60a798576cb4fe47d2762ffba0 /pkg/worker_watcher/worker_watcher.go | |
parent | 36f01dc035f42115fcfd3b77dc5df3098382cd9f (diff) | |
parent | 2bdf7fafa73cabf7cf63657a6b58f2a423ae0fcd (diff) |
Merge pull request #522 from spiral/fix/named_loggerv2.0.0-beta.22
bug(logger): Incorrect parsing of nested log levels
Diffstat (limited to 'pkg/worker_watcher/worker_watcher.go')
-rwxr-xr-x | pkg/worker_watcher/worker_watcher.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/worker_watcher/worker_watcher.go b/pkg/worker_watcher/worker_watcher.go index 753b61ee..cf2e1eb7 100755 --- a/pkg/worker_watcher/worker_watcher.go +++ b/pkg/worker_watcher/worker_watcher.go @@ -5,8 +5,8 @@ import ( "sync" "github.com/spiral/errors" - "github.com/spiral/roadrunner/v2/internal" "github.com/spiral/roadrunner/v2/pkg/events" + "github.com/spiral/roadrunner/v2/pkg/states" "github.com/spiral/roadrunner/v2/pkg/worker" ) @@ -49,7 +49,7 @@ func (ww *workerWatcher) GetFreeWorker(ctx context.Context) (worker.SyncWorker, // handle worker remove state // in this state worker is destroyed by supervisor - if w != nil && w.State().Value() == internal.StateRemove { + if w != nil && w.State().Value() == states.StateRemove { err := ww.RemoveWorker(w) if err != nil { return nil, err @@ -102,7 +102,7 @@ func (ww *workerWatcher) RemoveWorker(wb worker.SyncWorker) error { pid := wb.Pid() if ww.stack.FindAndRemoveByPid(pid) { - wb.State().Set(internal.StateRemove) + wb.State().Set(states.StateRemove) err := wb.Kill() if err != nil { return errors.E(op, err) @@ -142,7 +142,7 @@ func (ww *workerWatcher) wait(w worker.BaseProcess) { }) } - if w.State().Value() == internal.StateDestroyed { + if w.State().Value() == states.StateDestroyed { // worker was manually destroyed, no need to replace ww.events.Push(events.PoolEvent{Event: events.EventWorkerDestruct, Payload: w}) return |