You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!--- Note to EXTERNAL Contributors -->
<!-- Thanks for opening a PR!
If it is a significant code change, please **make sure there is an open
issue** for this.
We work best with you when we have accepted the idea first before you
code. -->
<!--- For ALL Contributors 👇 -->
## What was changed
Use imperative verbs in cli
## Why?
Consistency
## Checklist
<!--- add/delete as needed --->
1. Closes <!-- add issue number here -->
2. How was this tested:
<!--- Please describe how you tested your changes/how we can test them
-->
3. Any docs updates needed?
<!--- update README if applicable
or point out where to update docs.temporal.io -->
s.Command.Long="Resetting an activity restarts the activity as if it were first being \nscheduled. That is, it will reset both the number of attempts and the \nactivity timeout, as well as, optionally, the \nheartbeat details.\n\nIf the activity may be executing (i.e. it has not yet timed out), the \nreset will take effect the next time it fails, heartbeats, or times out.\nIf is waiting for a retry (i.e. has failed or timed out), the reset \nwill apply immediately.\n\nIf the activity is already paused, it will be unpaused by default. \nYou can specify \x1b[1mkeep_paused\x1b[0m to prevent this.\n\nIf the activity is paused and the \x1b[1mkeep_paused\x1b[0m flag is not provided, \nit will be unpaused. If the activity is paused and \x1b[1mkeep_paused\x1b[0m flag \nis provided - it will stay paused.\n\nActivities can be specified by their Activity ID or Activity Type.\n\n### Resetting activities that heartbeat {#reset-heartbeats}\n\nActivities that heartbeat will receive a Canceled failure \nthe next time they heartbeat after a reset.\n\nIf, in your Activity, you need to do any cleanup when an Activity is \nreset, handle this error and then re-throw it when you've cleaned up.\n\nIf the \x1b[1mreset_heartbeats\x1b[0m flag is set, the heartbeat details will also be cleared.\n\nSpecify the Activity Type of ID and Workflow IDs:\n\n\x1b[1mtemporal activity reset \\\n --activity-id YourActivityId \\\n --workflow-id YourWorkflowId\n --keep-paused\n --reset-heartbeats\x1b[0m"
541
+
s.Command.Long="Reset an activity. This restarts the activity as if it were first being \nscheduled. That is, it will reset both the number of attempts and the \nactivity timeout, as well as, optionally, the \nheartbeat details.\n\nIf the activity may be executing (i.e. it has not yet timed out), the \nreset will take effect the next time it fails, heartbeats, or times out.\nIf is waiting for a retry (i.e. has failed or timed out), the reset \nwill apply immediately.\n\nIf the activity is already paused, it will be unpaused by default. \nYou can specify \x1b[1mkeep_paused\x1b[0m to prevent this.\n\nIf the activity is paused and the \x1b[1mkeep_paused\x1b[0m flag is not provided, \nit will be unpaused. If the activity is paused and \x1b[1mkeep_paused\x1b[0m flag \nis provided - it will stay paused.\n\nActivities can be specified by their Activity ID or Activity Type.\n\n### Resetting activities that heartbeat {#reset-heartbeats}\n\nActivities that heartbeat will receive a Canceled failure \nthe next time they heartbeat after a reset.\n\nIf, in your Activity, you need to do any cleanup when an Activity is \nreset, handle this error and then re-throw it when you've cleaned up.\n\nIf the \x1b[1mreset_heartbeats\x1b[0m flag is set, the heartbeat details will also be cleared.\n\nSpecify the Activity Type of ID and Workflow IDs:\n\n\x1b[1mtemporal activity reset \\\n --activity-id YourActivityId \\\n --workflow-id YourWorkflowId\n --keep-paused\n --reset-heartbeats\x1b[0m"
542
542
} else {
543
-
s.Command.Long="Resetting an activity restarts the activity as if it were first being \nscheduled. That is, it will reset both the number of attempts and the \nactivity timeout, as well as, optionally, the \nheartbeat details.\n\nIf the activity may be executing (i.e. it has not yet timed out), the \nreset will take effect the next time it fails, heartbeats, or times out.\nIf is waiting for a retry (i.e. has failed or timed out), the reset \nwill apply immediately.\n\nIf the activity is already paused, it will be unpaused by default. \nYou can specify `keep_paused` to prevent this.\n\nIf the activity is paused and the `keep_paused` flag is not provided, \nit will be unpaused. If the activity is paused and `keep_paused` flag \nis provided - it will stay paused.\n\nActivities can be specified by their Activity ID or Activity Type.\n\n### Resetting activities that heartbeat {#reset-heartbeats}\n\nActivities that heartbeat will receive a Canceled failure \nthe next time they heartbeat after a reset.\n\nIf, in your Activity, you need to do any cleanup when an Activity is \nreset, handle this error and then re-throw it when you've cleaned up.\n\nIf the `reset_heartbeats` flag is set, the heartbeat details will also be cleared.\n\nSpecify the Activity Type of ID and Workflow IDs:\n\n```\ntemporal activity reset \\\n --activity-id YourActivityId \\\n --workflow-id YourWorkflowId\n --keep-paused\n --reset-heartbeats\n```"
543
+
s.Command.Long="Reset an activity. This restarts the activity as if it were first being \nscheduled. That is, it will reset both the number of attempts and the \nactivity timeout, as well as, optionally, the \nheartbeat details.\n\nIf the activity may be executing (i.e. it has not yet timed out), the \nreset will take effect the next time it fails, heartbeats, or times out.\nIf is waiting for a retry (i.e. has failed or timed out), the reset \nwill apply immediately.\n\nIf the activity is already paused, it will be unpaused by default. \nYou can specify `keep_paused` to prevent this.\n\nIf the activity is paused and the `keep_paused` flag is not provided, \nit will be unpaused. If the activity is paused and `keep_paused` flag \nis provided - it will stay paused.\n\nActivities can be specified by their Activity ID or Activity Type.\n\n### Resetting activities that heartbeat {#reset-heartbeats}\n\nActivities that heartbeat will receive a Canceled failure \nthe next time they heartbeat after a reset.\n\nIf, in your Activity, you need to do any cleanup when an Activity is \nreset, handle this error and then re-throw it when you've cleaned up.\n\nIf the `reset_heartbeats` flag is set, the heartbeat details will also be cleared.\n\nSpecify the Activity Type of ID and Workflow IDs:\n\n```\ntemporal activity reset \\\n --activity-id YourActivityId \\\n --workflow-id YourWorkflowId\n --keep-paused\n --reset-heartbeats\n```"
544
544
}
545
545
s.Command.Args=cobra.NoArgs
546
546
s.Command.Flags().StringVarP(&s.ActivityId, "activity-id", "a", "", "The Activity ID to reset. Either `activity-id` or `activity-type` must be provided, but not both.")
s.Command.Long="Updates the options of a running Activity that were passed into it from\n a Workflow. Updates are incremental, only changing the specified \n options.\n\nFor example:\n\n\x1b[1mtemporal activity update-options \\\n --activity-id YourActivityId \\\n --workflow-id YourWorkflowId \\\n --task-queue NewTaskQueueName \\\n --schedule-to-close-timeout DURATION \\\n --schedule-to-start-timeout DURATION \\\n --start-to-close-timeout DURATION \\\n --heartbeat-timeout DURATION \\\n --retry-initial-interval DURATION \\\n --retry-maximum-interval DURATION \\\n --retry-backoff-coefficient NewBackoffCoefficient \\\n --retry-maximum-attempts NewMaximumAttempts\x1b[0m\n\nYou may follow this command with \x1b[1mtemporal activity reset\x1b[0m, and the new values will apply after the reset."
626
+
s.Command.Long="Update the options of a running Activity that were passed into it from\n a Workflow. Updates are incremental, only changing the specified \n options.\n\nFor example:\n\n\x1b[1mtemporal activity update-options \\\n --activity-id YourActivityId \\\n --workflow-id YourWorkflowId \\\n --task-queue NewTaskQueueName \\\n --schedule-to-close-timeout DURATION \\\n --schedule-to-start-timeout DURATION \\\n --start-to-close-timeout DURATION \\\n --heartbeat-timeout DURATION \\\n --retry-initial-interval DURATION \\\n --retry-maximum-interval DURATION \\\n --retry-backoff-coefficient NewBackoffCoefficient \\\n --retry-maximum-attempts NewMaximumAttempts\x1b[0m\n\nYou may follow this command with \x1b[1mtemporal activity reset\x1b[0m, and the new values will apply after the reset."
627
627
} else {
628
-
s.Command.Long="Updates the options of a running Activity that were passed into it from\n a Workflow. Updates are incremental, only changing the specified \n options.\n\nFor example:\n\n```\ntemporal activity update-options \\\n --activity-id YourActivityId \\\n --workflow-id YourWorkflowId \\\n --task-queue NewTaskQueueName \\\n --schedule-to-close-timeout DURATION \\\n --schedule-to-start-timeout DURATION \\\n --start-to-close-timeout DURATION \\\n --heartbeat-timeout DURATION \\\n --retry-initial-interval DURATION \\\n --retry-maximum-interval DURATION \\\n --retry-backoff-coefficient NewBackoffCoefficient \\\n --retry-maximum-attempts NewMaximumAttempts\n```\n\nYou may follow this command with `temporal activity reset`, and the new values will apply after the reset."
628
+
s.Command.Long="Update the options of a running Activity that were passed into it from\n a Workflow. Updates are incremental, only changing the specified \n options.\n\nFor example:\n\n```\ntemporal activity update-options \\\n --activity-id YourActivityId \\\n --workflow-id YourWorkflowId \\\n --task-queue NewTaskQueueName \\\n --schedule-to-close-timeout DURATION \\\n --schedule-to-start-timeout DURATION \\\n --start-to-close-timeout DURATION \\\n --heartbeat-timeout DURATION \\\n --retry-initial-interval DURATION \\\n --retry-maximum-interval DURATION \\\n --retry-backoff-coefficient NewBackoffCoefficient \\\n --retry-maximum-attempts NewMaximumAttempts\n```\n\nYou may follow this command with `temporal activity reset`, and the new values will apply after the reset."
0 commit comments