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
@@ -367,42 +367,56 @@ Override target TLS server name.
367
367
368
368
## pause
369
369
370
+
:::tip Stability
371
+
372
+
In [Public Preview](/evaluate/development-production-features/release-stages#public-preview).
373
+
374
+
Available in Temporal Cloud.
375
+
376
+
Supported Open Source Versions:
377
+
378
+
-[Temporal Server version 1.28](https://github.com/temporalio/temporal/releases/tag/v1.28.0) and higher.
379
+
-[CLI version v1.4](https://github.com/temporalio/cli/releases/tag/v1.4.0) and higher.
380
+
381
+
:::
382
+
370
383
Pause an Activity.
371
384
372
385
If the Activity is not currently running (e.g. because it previously
373
386
failed), it will not be run again until it is unpaused.
374
387
375
-
However, if the Activity is currently running, it will run to completion.
388
+
However, if the Activity is currently running, it will run until the next time it fails, completes, or times out, at which point the pause will kick in.
389
+
376
390
If the Activity is on its last retry attempt and fails, the failure will
377
391
be returned to the caller, just as if the Activity had not been paused.
378
392
379
-
Activities can be specified by their Activity ID or Activity Type.
380
-
One of those parameters must be provided. If both are provided - Activity
381
-
Type will be used, and Activity ID will be ignored.
393
+
Activities should be specified either by their Activity ID or Activity Type.
382
394
383
-
Specify the Activity and Workflow IDs:
395
+
For example, specify the Activity and Workflow IDs like this:
384
396
385
397
```
386
398
temporal activity pause \
387
399
--activity-id YourActivityId \
388
400
--workflow-id YourWorkflowId
389
401
```
390
402
403
+
To later unpause the activity, see [unpause](#unpause). You may also want to [reset](#reset) the activity to unpause it while also starting it from the beginning.
404
+
391
405
Use the following options to change the behavior of this command.
392
406
393
407
**Flags:**
394
408
395
409
**--activity-id**, **-a**_string_
396
410
397
-
Activity ID to pause. Either `activity-id` or `activity-type` must be provided, but not both.
411
+
The Activity ID to pause. Either `activity-id` or `activity-type` must be provided, but not both.
398
412
399
413
**--activity-type**, **-g**_string_
400
414
401
-
Activity Type to pause. Either `activity-id` or `activity-type` must be provided, but not both.
415
+
All activities of the Activity Type will be paused. Either `activity-id` or `activity-type` must be provided, but not both.
402
416
403
417
**--identity**_string_
404
418
405
-
Identity of the user submitting this request.
419
+
The identity of the user or client submitting this request.
406
420
407
421
**--run-id**_string_
408
422
@@ -556,20 +570,40 @@ Override target TLS server name.
556
570
557
571
## reset
558
572
559
-
Resetting an activity resets both the number of attempts and the activity
560
-
timeout.
573
+
:::tip Stability
574
+
575
+
In [Public Preview](/evaluate/development-production-features/release-stages#public-preview).
576
+
577
+
Available in Temporal Cloud.
578
+
579
+
Supported Open Source Versions:
561
580
562
-
If activity is paused and 'keep_paused' flag is not provided - it will be
581
+
-[Temporal Server version 1.28](https://github.com/temporalio/temporal/releases/tag/v1.28.0) and higher.
582
+
-[CLI version v1.4](https://github.com/temporalio/cli/releases/tag/v1.4.0) and higher.
583
+
584
+
:::
585
+
586
+
Resetting an activity restarts the activity as if it were first being scheduled. That is, it will reset both the number of attempts and the activity timeout, as well as, optionally, the [heartbeat details](#reset-heartbeats).
587
+
588
+
If the activity may be executing (i.e. it has not yet timed out), the reset will take effect the next time it fails, heartbeats, or times out.
589
+
If is waiting for a retry (i.e. has failed or timed out), the reset will apply immediately.
590
+
591
+
If the activity is already paused, it will be unpaused by default. You can specify `keep_paused` to prevent this.
592
+
593
+
If the activity is paused and the `keep_paused` flag is not provided, it will be
563
594
unpaused.
564
-
If activity is paused and 'keep_paused' flag is provided - it will stay
595
+
If the activity is paused and `keep_paused` flag is provided - it will stay
565
596
paused.
566
-
If activity is waiting for the retry, is will be rescheduled immediately.
567
-
If the 'reset_heartbeats' flag is set, the activity heartbeat timer and
568
-
heartbeats will be reset.
569
597
570
598
Activities can be specified by their Activity ID or Activity Type.
571
-
One of those parameters must be provided. If both are provided - Activity
572
-
Type will be used, and Activity ID will be ignored.
599
+
600
+
### Resetting activities that heartbeat {#reset-heartbeats}
601
+
602
+
Activities that heartbeat will receive a [Canceled failure](/references/failures#cancelled-failure) the next time they heartbeat after a reset.
603
+
604
+
If, in your Activity, you need to do any cleanup when an Activity is reset, handle this error and then re-throw it when you've cleaned up.
605
+
606
+
If the `reset_heartbeats` flag is set, the heartbeat details will also be cleared.
573
607
574
608
Specify the Activity Type of ID and Workflow IDs:
575
609
@@ -587,23 +621,23 @@ Use the following options to change the behavior of this command.
587
621
588
622
**--activity-id**, **-a**_string_
589
623
590
-
Activity ID to reset. Either `activity-id` or `activity-type` must be provided, but not both.
624
+
The Activity ID to reset. Either `activity-id` or `activity-type` must be provided, but not both.
591
625
592
626
**--activity-type**, **-g**_string_
593
627
594
-
Activity Type to reset. Either `activity-id` or `activity-type` must be provided, but not both.
628
+
to reset. Either `activity-id` or `activity-type` must be provided, but not both.
595
629
596
630
**--identity**_string_
597
631
598
-
Identity of the user submitting this request.
632
+
The identity of the user or client submitting this request.
599
633
600
634
**--keep-paused**_bool_
601
635
602
-
If activity was paused - it will stay paused.
636
+
If the activity was paused, it will stay paused.
603
637
604
638
**--reset-heartbeats**_bool_
605
639
606
-
Reset the Activity's heartbeat.
640
+
Clear the Activity's heartbeat details.
607
641
608
642
**--run-id**_string_
609
643
@@ -757,6 +791,19 @@ Override target TLS server name.
757
791
758
792
## unpause
759
793
794
+
:::tip Stability
795
+
796
+
In [Public Preview](/evaluate/development-production-features/release-stages#public-preview).
797
+
798
+
Available in Temporal Cloud.
799
+
800
+
Supported Open Source Versions:
801
+
802
+
-[Temporal Server version 1.28](https://github.com/temporalio/temporal/releases/tag/v1.28.0) and higher.
803
+
-[CLI version v1.4](https://github.com/temporalio/cli/releases/tag/v1.4.0) and higher.
804
+
805
+
:::
806
+
760
807
Re-schedule a previously-paused Activity for execution.
761
808
762
809
If the Activity is not running and is past its retry timeout, it will be
@@ -771,16 +818,7 @@ Activity to be retried another N times after unpausing.
771
818
Use `--reset-heartbeat` to reset the Activity's heartbeats.
772
819
773
820
Activities can be specified by their Activity ID or Activity Type.
774
-
One of those parameters must be provided. If both are provided - Activity
775
-
Type will be used, and Activity ID will be ignored.
776
-
777
-
Activities can be unpaused in bulk via a visibility Query list filter:
778
-
779
-
```
780
-
temporal activity unpause \
781
-
--query YourQuery \
782
-
--reason YourReasonForTermination
783
-
```
821
+
One of those parameters must be provided.
784
822
785
823
Specify the Activity ID or Type and Workflow IDs:
786
824
@@ -792,21 +830,28 @@ temporal activity unpause \
792
830
--reset-heartbeats
793
831
```
794
832
833
+
Activities can be unpaused in bulk via a visibility Query list filter. For example, if you want to unpause activities of type Foo that you previously paused, do:
Use the following options to change the behavior of this command.
1073
+
You may follow this command with `temporal activity reset`, and the new values will apply after the reset.
1074
+
1075
+
Use the following options:
1015
1076
1016
1077
**Flags:**
1017
1078
@@ -1021,39 +1082,40 @@ Activity ID. Required.
1021
1082
1022
1083
**--heartbeat-timeout**_duration_
1023
1084
1024
-
Maximum permitted time between successful worker heartbeats.
1085
+
Modifies the Activity's [Heartbeat Timeout](/encyclopedia/detecting-activity-failures#heartbeat-timeout).
1025
1086
1026
1087
**--identity**_string_
1027
1088
1028
-
Identity of the user submitting this request.
1089
+
The identity of the user or client submitting this request.
1029
1090
1030
1091
**--retry-backoff-coefficient**_float_
1031
1092
1032
-
Coefficient used to calculate the next retry interval. The next retry interval is previous interval multiplied by the backoffcoefficient. Must be 1 or larger.
1093
+
Modifies the [Backoff Coefficient](/encyclopedia/retry-policies#backoff-coefficient)
1033
1094
1034
1095
**--retry-initial-interval**_duration_
1035
1096
1036
-
Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
1097
+
Modifies the [Initial Retry Interval](/encyclopedia/retry-policies#initial-interval) in the activity's Retry Policy.
1098
+
If your activity has already retried, this is only useful in conjunction with activity reset.
1037
1099
1038
1100
**--retry-maximum-attempts**_int_
1039
1101
1040
-
Maximum number of attempts. When exceeded the retries stop even if not expired yet. Setting this value to 1 disables retries. Setting this value to 0 means unlimited attempts(up to the timeouts).
1102
+
Modifies the [Maximum Attempts](/encyclopedia/retry-policies#maximum-attempts) in the activity's Retry Policy.
1041
1103
1042
1104
**--retry-maximum-interval**_duration_
1043
1105
1044
-
Maximum interval between retries. Exponential backoff leads to interval increase. This value is the cap of the increase.
1106
+
Modifies the [Maximum Interval](/encyclopedia/retry-policies#maximum-interval) in the activity's Retry Policy.
1045
1107
1046
1108
**--schedule-to-close-timeout**_duration_
1047
1109
1048
-
Indicates how long the caller is willing to wait for an activity completion. Limits how long retries will be attempted.
1110
+
Modifies the activity's [Schedule-to-Close Timeout](/encyclopedia/detecting-activity-failures#schedule-to-close-timeout).
1049
1111
1050
1112
**--schedule-to-start-timeout**_duration_
1051
1113
1052
-
Limits time an activity task can stay in a task queue before a worker picks it up. This timeout is always non retryable, as all a retry would achieve is to put it back into the same queue. Defaults to the schedule-to-close timeout or workflow execution timeout if not specified.
1114
+
Modifies the activity's [Schedule-to-Start Timeout](/encyclopedia/detecting-activity-failures#schedule-to-start-timeout).
1053
1115
1054
1116
**--start-to-close-timeout**_duration_
1055
1117
1056
-
Maximum time an activity is allowed to execute after being picked up by a worker. This timeout is always retryable.
1118
+
Modifies the activity's [Start-to-Close Timeout](/encyclopedia/detecting-activity-failures#start-to-close-timeout).
0 commit comments