diff options
author | Wolfy-J <[email protected]> | 2018-06-03 18:02:24 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-03 18:02:24 +0300 |
commit | 7877e54547d1f8ca3b3431c6e9aa3cbd80af1403 (patch) | |
tree | 0485b09f58c60faf8f6ec856440c040cf660854f /cmd/rr/http | |
parent | 3c3ce22b7f1620bbcb0f787b26f1b1db4487470b (diff) |
polishing
Diffstat (limited to 'cmd/rr/http')
-rw-r--r-- | cmd/rr/http/reload.go | 10 | ||||
-rw-r--r-- | cmd/rr/http/workers.go | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/cmd/rr/http/reload.go b/cmd/rr/http/reload.go index 89c0b74b..6cdba576 100644 --- a/cmd/rr/http/reload.go +++ b/cmd/rr/http/reload.go @@ -21,22 +21,24 @@ package http import ( - "fmt" "github.com/spf13/cobra" rr "github.com/spiral/roadrunner/cmd/rr/cmd" + "github.com/sirupsen/logrus" ) func reloadHandler(cmd *cobra.Command, args []string) { client, err := rr.Services.RCPClient() if err != nil { - panic(err) // todo: change + logrus.Error(err) + return } defer client.Close() var r string if err := client.Call("http.Reset", true, &r); err != nil { - panic(err) + logrus.Error(err) + return } - fmt.Println(r) + logrus.Info("restarting http worker pool") } diff --git a/cmd/rr/http/workers.go b/cmd/rr/http/workers.go index 19fc6df8..13e8d21c 100644 --- a/cmd/rr/http/workers.go +++ b/cmd/rr/http/workers.go @@ -27,12 +27,14 @@ import ( "github.com/spiral/roadrunner/http" "os" "strconv" + "github.com/sirupsen/logrus" ) func workersHandler(cmd *cobra.Command, args []string) { client, err := rr.Services.RCPClient() if err != nil { - panic(err) // todo: change + logrus.Error(err) + return } defer client.Close() |