diff options
author | Wolfy-J <[email protected]> | 2018-06-10 21:17:54 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-10 21:17:54 +0300 |
commit | 7cc6d00a1c350eb3147ede00802d312d4be94dee (patch) | |
tree | ac1391c831d4366b477e61b57e095a1dfeafbbb7 /cmd/rr/http | |
parent | e9203e05a7f3278a8080d0f69e6640e5d3d1042d (diff) |
debug is not service anymore
Diffstat (limited to 'cmd/rr/http')
-rw-r--r-- | cmd/rr/http/workers.go | 10 |
1 files changed, 8 insertions, 2 deletions
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)) } |