summaryrefslogtreecommitdiff
path: root/pkg/pool/static_pool.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-02-02 19:17:03 +0300
committerValery Piashchynski <[email protected]>2021-02-02 19:17:03 +0300
commit2bdf7fafa73cabf7cf63657a6b58f2a423ae0fcd (patch)
treefe5efc14a18f78218816a2bc7a2e19ee95642714 /pkg/pool/static_pool.go
parent68becf8c58daec426f94513cf444061c199194d7 (diff)
Move worker states out of internal
Diffstat (limited to 'pkg/pool/static_pool.go')
-rwxr-xr-xpkg/pool/static_pool.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/pool/static_pool.go b/pkg/pool/static_pool.go
index 44adf9c0..01b0574d 100755
--- a/pkg/pool/static_pool.go
+++ b/pkg/pool/static_pool.go
@@ -6,9 +6,9 @@ import (
"time"
"github.com/spiral/errors"
- "github.com/spiral/roadrunner/v2/internal"
"github.com/spiral/roadrunner/v2/pkg/events"
"github.com/spiral/roadrunner/v2/pkg/payload"
+ "github.com/spiral/roadrunner/v2/pkg/states"
"github.com/spiral/roadrunner/v2/pkg/transport"
"github.com/spiral/roadrunner/v2/pkg/worker"
workerWatcher "github.com/spiral/roadrunner/v2/pkg/worker_watcher"
@@ -195,7 +195,7 @@ func (sp *StaticPool) ExecWithContext(ctx context.Context, p payload.Payload) (p
func (sp *StaticPool) stopWorker(w worker.SyncWorker) {
const op = errors.Op("static_pool_stop_worker")
- w.State().Set(internal.StateInvalid)
+ w.State().Set(states.StateInvalid)
err := w.Stop()
if err != nil {
sp.events.Push(events.WorkerEvent{Event: events.EventWorkerError, Worker: w, Payload: errors.E(op, err)})
@@ -251,7 +251,7 @@ func defaultErrEncoder(sp *StaticPool) ErrorEncoder {
sp.events.Push(events.PoolEvent{Event: events.EventWorkerConstruct, Payload: errors.E(op, err)})
}
- w.State().Set(internal.StateInvalid)
+ w.State().Set(states.StateInvalid)
err = w.Stop()
if err != nil {
sp.events.Push(events.WorkerEvent{Event: events.EventWorkerError, Worker: w, Payload: errors.E(op, err)})
@@ -263,7 +263,7 @@ func defaultErrEncoder(sp *StaticPool) ErrorEncoder {
return payload.Payload{}, errors.E(op, err)
}
- w.State().Set(internal.StateInvalid)
+ w.State().Set(states.StateInvalid)
sp.events.Push(events.PoolEvent{Event: events.EventWorkerDestruct, Payload: w})
errS := w.Stop()