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 #918

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mboorstin
Copy link

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("type_name", "t", "", "type name to enqueue the task as (required)")
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
Copy link
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.

@mboorstin
Copy link
Author

@kamikazechaser @hibiken I've found this added command to be helpful; please let me know if you have any comments on it. Thank you!

@kamikazechaser
Copy link
Collaborator

Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants