Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add task enqueue command to cli #1

Closed
wants to merge 1 commit into from
Closed

Conversation

mboorstin
Copy link
Owner

Add a task enqueue command to the CLI to allow manually enqueuing a task with specified payload and various options. This is useful when manually interacting with asynq or attempting to trigger specific actions.

taskEnqueueCmd.Flags().StringP("payload", "l", "", "payload to enqueue (required)")
// The following are the various OptionTypes; if not specified we won't pass them so that composeOptions()
// can apply its own defaults
taskEnqueueCmd.Flags().Int("retry", 0, "maximum retries")
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameter names are chosen to match the names at https://github.com/hibiken/asynq/blob/master/client.go#L67 . The only exception is id; the Option is named TaskID but all of the other commands here use id so I figured it was better to stick with that.

Copy link

@dan-pulley dan-pulley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looked into a couple things and it all checks out. 👍

@mboorstin
Copy link
Owner Author

Thanks @dan-pulley ! Closing in favor of hibiken#918.

@mboorstin mboorstin closed this Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants