summaryrefslogtreecommitdiff
path: root/cmd/rr/http/workers.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/rr/http/workers.go')
-rw-r--r--cmd/rr/http/workers.go10
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))
}