2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-12-25 07:12:17 +08:00

Minor fixes

This commit is contained in:
Ken Hibino 2019-12-07 19:59:12 -08:00
parent 2951cc355f
commit 9941c9e303
2 changed files with 10 additions and 9 deletions

View File

@ -20,10 +20,10 @@ var validArgs = []string{"enqueued", "inprogress", "scheduled", "retry", "dead"}
var lsCmd = &cobra.Command{
Use: "ls",
Short: "lists queue contents",
Long: `The ls command lists all tasks from the given queue in a table format.
Long: `The ls command lists all tasks from the specified queue in a table format.
The command takes one argument which specifies the queue. The value
for the argument should be one of "enqueued", "inprogress", "scheduled",
The command takes one argument which specifies the queue to inspect. The value
of the argument should be one of "enqueued", "inprogress", "scheduled",
"retry", or "dead".
Example: asynqmon ls dead`,
@ -64,7 +64,7 @@ func ls(cmd *cobra.Command, args []string) {
case "dead":
listDead(r)
default:
fmt.Printf("error: `asynqmon ls <queue>` only accepts %v as the argument for queue.\n", validArgs)
fmt.Printf("error: `asynqmon ls <queue>` only accepts %v as the argument.\n", validArgs)
return
}
}

View File

@ -19,12 +19,13 @@ var db int
var rootCmd = &cobra.Command{
Use: "asynqmon",
Short: "A monitoring tool for asynq queues",
Long: `TODO(hibiken): A longer description that spans multiple lines and likely contains
examples and usage of using your application. For example:
Long: `Asynqmon is a CLI tool to inspect and monitor queues managed by asynq package.
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Asynqmon has a few subcommands to show the current state of the queues, while others were
used to make manual changes to the queues. Monitoring commands can be used in conjunction
with the "watch" command to continuously run the command at a certain interval.
Example: watch -n 5 asynqmon stats`,
// Uncomment the following line if your bare application
// has an action associated with it:
// Run: func(cmd *cobra.Command, args []string) { },