@@ -716,7 +716,8 @@ def _to_proto
716716 Policy = Data . define (
717717 :overlap ,
718718 :catchup_window ,
719- :pause_on_failure
719+ :pause_on_failure ,
720+ :keep_original_workflow_id
720721 )
721722
722723 # Policies of a schedule.
@@ -728,6 +729,8 @@ def _to_proto
728729 # @!attribute pause_on_failure
729730 # @return [Boolean] Whether to pause the schedule if an action fails or times out. Note: For workflows, this
730731 # only applies after all retries have been exhausted.
732+ # @!attribute keep_original_workflow_id
733+ # @return [Boolean] Whether to keep the original workflow ID without appending a timestamp for uniqueness.
731734 class Policy
732735 # @!visibility private
733736 def self . _from_proto ( raw_policies )
@@ -736,7 +739,8 @@ def self._from_proto(raw_policies)
736739 raw_policies . overlap_policy ,
737740 zero_means_nil : true ) ,
738741 catchup_window : Internal ::ProtoUtils . duration_to_seconds ( raw_policies . catchup_window ) || raise , # Never nil
739- pause_on_failure : raw_policies . pause_on_failure
742+ pause_on_failure : raw_policies . pause_on_failure ,
743+ keep_original_workflow_id : raw_policies . keep_original_workflow_id
740744 )
741745 end
742746
@@ -747,10 +751,13 @@ def self._from_proto(raw_policies)
747751 # missed actions.
748752 # @param pause_on_failure [Boolean] Whether to pause the schedule if an action fails or times out. Note: For
749753 # workflows, this only applies after all retries have been exhausted.
754+ # @param keep_original_workflow_id [Boolean] Whether to keep the original workflow ID without appending a
755+ # timestamp for uniqueness.
750756 def initialize (
751757 overlap : OverlapPolicy ::SKIP ,
752758 catchup_window : 365 * 24 * 60 * 60.0 ,
753- pause_on_failure : false
759+ pause_on_failure : false ,
760+ keep_original_workflow_id : false
754761 )
755762 super
756763 end
@@ -760,7 +767,8 @@ def _to_proto
760767 Api ::Schedule ::V1 ::SchedulePolicies . new (
761768 overlap_policy : overlap ,
762769 catchup_window : Internal ::ProtoUtils . seconds_to_duration ( catchup_window ) ,
763- pause_on_failure :
770+ pause_on_failure :,
771+ keep_original_workflow_id :
764772 )
765773 end
766774 end
0 commit comments