From ef562e2efabb8047b72e81880d51f0726ca4b3b1 Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Tue, 10 Dec 2019 21:48:19 -0800 Subject: [PATCH] Minor improvement --- internal/rdb/inspect.go | 4 ++-- tools/asynqmon/cmd/enqall.go | 2 +- tools/asynqmon/cmd/ls.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/rdb/inspect.go b/internal/rdb/inspect.go index a702554..872cc59 100644 --- a/internal/rdb/inspect.go +++ b/internal/rdb/inspect.go @@ -272,13 +272,13 @@ func (r *RDB) EnqueueScheduledTask(id uuid.UUID, score int64) error { return nil } -// EnqueueAllScheduledTasks enqueues all tasks from scheduled queue. +// EnqueueAllScheduledTasks enqueues all tasks from scheduled queue // and returns the number of tasks enqueued. func (r *RDB) EnqueueAllScheduledTasks() (int64, error) { return r.removeAndEnqueueAll(scheduledQ) } -// EnqueueAllRetryTasks enqueues all tasks from retry queue. +// EnqueueAllRetryTasks enqueues all tasks from retry queue // and returns the number of tasks enqueued. func (r *RDB) EnqueueAllRetryTasks() (int64, error) { return r.removeAndEnqueueAll(retryQ) diff --git a/tools/asynqmon/cmd/enqall.go b/tools/asynqmon/cmd/enqall.go index 0293366..d60bef4 100644 --- a/tools/asynqmon/cmd/enqall.go +++ b/tools/asynqmon/cmd/enqall.go @@ -58,7 +58,7 @@ func enqall(cmd *cobra.Command, args []string) { case "dead": n, err = r.EnqueueAllDeadTasks() default: - fmt.Printf("error: `asynqmon enqall ` only accepts %v as the argument.\n", enqallValidArgs) + fmt.Printf("error: `asynqmon enqall [queue name]` only accepts %v as the argument.\n", enqallValidArgs) os.Exit(1) } if err != nil { diff --git a/tools/asynqmon/cmd/ls.go b/tools/asynqmon/cmd/ls.go index 49aaf93..bd94f50 100644 --- a/tools/asynqmon/cmd/ls.go +++ b/tools/asynqmon/cmd/ls.go @@ -65,7 +65,7 @@ func ls(cmd *cobra.Command, args []string) { case "dead": listDead(r) default: - fmt.Printf("error: `asynqmon ls ` only accepts %v as the argument.\n", lsValidArgs) + fmt.Printf("error: `asynqmon ls [queue name]` only accepts %v as the argument.\n", lsValidArgs) os.Exit(1) } }