[GH-ISSUE #444] [FEATURE REQUEST] list all available states in cmd tool help info #202

Closed
opened 2026-03-02 05:19:35 +03:00 by kerem · 1 comment
Owner

Originally created by @tony9527167 on GitHub (Apr 30, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/444

Originally assigned to: @hibiken on GitHub.

it not easy to remember all available state values

active     pending    aggregating  scheduled  retry      archived   completed  

if I make a small change https://github.com/hibiken/asynq/blob/master/tools/asynq/cmd/task.go#L22
from

taskListCmd.Flags().StringP("state", "s", "", "state of the tasks to inspect")
....

to

allStates := strings.Join([]string{
    Somewhere.ConstTaskStateActive,
    Somewhere.ConstTaskStatePending,
    ....
    ", "
}
taskListCmd.Flags().StringP("state", "s", "", fmt.Sprintf("state of the tasks to inspect, one of %s", allStates))
....

would you merge this pr?

Originally created by @tony9527167 on GitHub (Apr 30, 2022). Original GitHub issue: https://github.com/hibiken/asynq/issues/444 Originally assigned to: @hibiken on GitHub. it not easy to remember all available state values active pending aggregating scheduled retry archived completed if I make a small change https://github.com/hibiken/asynq/blob/master/tools/asynq/cmd/task.go#L22 from taskListCmd.Flags().StringP("state", "s", "", "state of the tasks to inspect") .... to allStates := strings.Join([]string{ Somewhere.ConstTaskStateActive, Somewhere.ConstTaskStatePending, .... ", " } taskListCmd.Flags().StringP("state", "s", "", fmt.Sprintf("state of the tasks to inspect, one of %s", allStates)) .... would you merge this pr?
kerem 2026-03-02 05:19:35 +03:00
Author
Owner

@hibiken commented on GitHub (Apr 30, 2022):

@tonytony2020 Thank you for the feedback!

I'm actually currently working on improving the help command output for the CLI (https://github.com/hibiken/asynq/tree/enhance/cli). Feel free to create a PR for that branch :)

<!-- gh-comment-id:1113999239 --> @hibiken commented on GitHub (Apr 30, 2022): @tonytony2020 Thank you for the feedback! I'm actually currently working on improving the help command output for the CLI (https://github.com/hibiken/asynq/tree/enhance/cli). Feel free to create a PR for that branch :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#202
No description provided.