mirror of
https://github.com/hibiken/asynq.git
synced 2024-12-25 07:12:17 +08:00
Minor fixes
This commit is contained in:
parent
2951cc355f
commit
9941c9e303
@ -20,10 +20,10 @@ var validArgs = []string{"enqueued", "inprogress", "scheduled", "retry", "dead"}
|
|||||||
var lsCmd = &cobra.Command{
|
var lsCmd = &cobra.Command{
|
||||||
Use: "ls",
|
Use: "ls",
|
||||||
Short: "lists queue contents",
|
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
|
The command takes one argument which specifies the queue to inspect. The value
|
||||||
for the argument should be one of "enqueued", "inprogress", "scheduled",
|
of the argument should be one of "enqueued", "inprogress", "scheduled",
|
||||||
"retry", or "dead".
|
"retry", or "dead".
|
||||||
|
|
||||||
Example: asynqmon ls dead`,
|
Example: asynqmon ls dead`,
|
||||||
@ -64,7 +64,7 @@ func ls(cmd *cobra.Command, args []string) {
|
|||||||
case "dead":
|
case "dead":
|
||||||
listDead(r)
|
listDead(r)
|
||||||
default:
|
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
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,12 +19,13 @@ var db int
|
|||||||
var rootCmd = &cobra.Command{
|
var rootCmd = &cobra.Command{
|
||||||
Use: "asynqmon",
|
Use: "asynqmon",
|
||||||
Short: "A monitoring tool for asynq queues",
|
Short: "A monitoring tool for asynq queues",
|
||||||
Long: `TODO(hibiken): A longer description that spans multiple lines and likely contains
|
Long: `Asynqmon is a CLI tool to inspect and monitor queues managed by asynq package.
|
||||||
examples and usage of using your application. For example:
|
|
||||||
|
|
||||||
Cobra is a CLI library for Go that empowers applications.
|
Asynqmon has a few subcommands to show the current state of the queues, while others were
|
||||||
This application is a tool to generate the needed files
|
used to make manual changes to the queues. Monitoring commands can be used in conjunction
|
||||||
to quickly create a Cobra application.`,
|
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
|
// Uncomment the following line if your bare application
|
||||||
// has an action associated with it:
|
// has an action associated with it:
|
||||||
// Run: func(cmd *cobra.Command, args []string) { },
|
// Run: func(cmd *cobra.Command, args []string) { },
|
||||||
|
Loading…
Reference in New Issue
Block a user