From 7cc6d00a1c350eb3147ede00802d312d4be94dee Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Sun, 10 Jun 2018 21:17:54 +0300 Subject: debug is not service anymore --- cmd/rr/http/workers.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'cmd/rr/http') diff --git a/cmd/rr/http/workers.go b/cmd/rr/http/workers.go index ddfe337c..3868d748 100644 --- a/cmd/rr/http/workers.go +++ b/cmd/rr/http/workers.go @@ -61,7 +61,13 @@ func init() { rr.CLI.AddCommand(workersCommand) } -func workersHandler(cmd *cobra.Command, args []string) error { +func workersHandler(cmd *cobra.Command, args []string) (err error) { + defer func() { + if r, ok := recover().(error); ok { + err = r + } + }() + svc, st := rr.Container.Get(rrpc.Name) if st < service.StatusConfigured { return errors.New("RPC service is not configured") @@ -136,7 +142,7 @@ func renderStatus(status string) string { return status } -func renderJobs(number uint64) string { +func renderJobs(number int64) string { return humanize.Comma(int64(number)) } -- cgit v1.2.3