-
Notifications
You must be signed in to change notification settings - Fork 42
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
Implement workflow terminate
command
#436
Changes from all commits
de6886d
c406c6f
650453f
00858fe
8ad817d
493e070
08d53d5
c712e1c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -338,8 +338,7 @@ Includes options set for [payload input](#options-set-for-payload-input). | |||||||||||||
* `--run-id`, `-r` (string) - Run Id. Cannot be set when query is set. | ||||||||||||||
* `--query`, `-q` (string) - Start a batch to Signal Workflow Executions with given List Filter. Either this or | ||||||||||||||
Workflow Id must be set. | ||||||||||||||
* `--reason` (string) - Reason to perform batch. Only allowed if query is present. Defaults to message with user name | ||||||||||||||
and time. | ||||||||||||||
* `--reason` (string) - Reason to perform batch. Only allowed if query is present unless the command specifies otherwise. Defaults to message with the current user's name. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This still mentions batch? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're looking at the help for
|
||||||||||||||
* `--yes`, `-y` (bool) - Confirm prompt to perform batch. Only allowed if query is present. | ||||||||||||||
|
||||||||||||||
### temporal workflow stack: Query a Workflow Execution with __stack_trace as the query type. | ||||||||||||||
|
@@ -386,12 +385,34 @@ temporal workflow start \ | |||||||||||||
|
||||||||||||||
### temporal workflow terminate: Terminate Workflow Execution by ID or List Filter. | ||||||||||||||
|
||||||||||||||
TODO | ||||||||||||||
The `temporal workflow terminate` command is used to terminate a [Workflow Execution](/concepts/what-is-a-workflow-execution). | ||||||||||||||
Canceling a running Workflow Execution records a `WorkflowExecutionTerminated` event as the closing Event in the workflow's Event History. | ||||||||||||||
Workflow code is oblivious to termination. Use `temporal workflow cancel` if you need to perform cleanup in your workflow. | ||||||||||||||
|
||||||||||||||
Executions may be terminated by [ID](/concepts/what-is-a-workflow-id) with an optional reason: | ||||||||||||||
``` | ||||||||||||||
temporal workflow terminate [--reason my-reason] --workflow-id MyWorkflowId | ||||||||||||||
``` | ||||||||||||||
|
||||||||||||||
...or in bulk via a visibility query [list filter](/concepts/what-is-a-list-filter): | ||||||||||||||
``` | ||||||||||||||
temporal workflow terminate --query=MyQuery | ||||||||||||||
``` | ||||||||||||||
|
||||||||||||||
Use the options listed below to change the behavior of this command. | ||||||||||||||
|
||||||||||||||
#### Options | ||||||||||||||
|
||||||||||||||
* `--workflow-id`, `-w` (string) - Workflow Id. Either this or query must be set. | ||||||||||||||
* `--run-id`, `-r` (string) - Run Id. Cannot be set when query is set. | ||||||||||||||
* `--query`, `-q` (string) - Start a batch to terminate Workflow Executions with given List Filter. Either this or Workflow Id must be set. | ||||||||||||||
* `--reason` (string) - Reason for termination. Defaults to message with the current user's name. | ||||||||||||||
* `--yes`, `-y` (bool) - Confirm prompt to perform batch. Only allowed if query is present. | ||||||||||||||
Comment on lines
+406
to
+410
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Or are you making this a completely separate options set just because of the English description of reason? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here's the discussion Roey and I had about this @cretz: #436 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can make docs more generic if we need to, but I have no problem copy/pasting just for docs-only reasons if we have to like here. |
||||||||||||||
|
||||||||||||||
### temporal workflow trace: Trace progress of a Workflow Execution and its children. | ||||||||||||||
|
||||||||||||||
TODO | ||||||||||||||
|
||||||||||||||
### temporal workflow update: Updates a running workflow synchronously. | ||||||||||||||
|
||||||||||||||
TODO | ||||||||||||||
TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably can toss all of this in a single struct instead of keeping overrides separate, but no biggie