summaryrefslogtreecommitdiff
path: root/cmd/rr/http/workers.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-09-26 22:30:53 +0300
committerWolfy-J <[email protected]>2018-09-26 22:30:53 +0300
commita206fc3270ea6e469b1704f15f2f15a9f6a14bbd (patch)
tree68bc61c49f84db861976659abed3784bb7e304a9 /cmd/rr/http/workers.go
parentd24c43aaeff897394eca140478c73dd146f8710a (diff)
improved debug handlers
Diffstat (limited to 'cmd/rr/http/workers.go')
-rw-r--r--cmd/rr/http/workers.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/cmd/rr/http/workers.go b/cmd/rr/http/workers.go
index 3c3e9987..4444b87f 100644
--- a/cmd/rr/http/workers.go
+++ b/cmd/rr/http/workers.go
@@ -21,14 +21,11 @@
package http
import (
- "errors"
tm "github.com/buger/goterm"
"github.com/spf13/cobra"
rr "github.com/spiral/roadrunner/cmd/rr/cmd"
- "github.com/spiral/roadrunner/cmd/rr/util"
- "github.com/spiral/roadrunner/service"
+ "github.com/spiral/roadrunner/cmd/util"
"github.com/spiral/roadrunner/service/http"
- rrpc "github.com/spiral/roadrunner/service/rpc"
"net/rpc"
"os"
"os/signal"
@@ -69,12 +66,7 @@ func workersHandler(cmd *cobra.Command, args []string) (err error) {
}
}()
- svc, st := rr.Container.Get(rrpc.ID)
- if st < service.StatusOK {
- return errors.New("RPC service is not configured")
- }
-
- client, err := svc.(*rrpc.Service).Client()
+ client, err := util.RPCClient(rr.Container)
if err != nil {
return err
}