Class: Temporalio::Client::Schedule::Policy

Inherits:
Data
  • Object
show all
Defined in:
lib/temporalio/client/schedule.rb,
lib/temporalio/client/schedule.rb

Overview

Policies of a schedule.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(overlap: OverlapPolicy::SKIP, catchup_window: 365 * 24 * 60 * 60.0, pause_on_failure: false) ⇒ Policy

Create a schedule policy.

Parameters:

  • overlap (OverlapPolicy) (defaults to: OverlapPolicy::SKIP)

    Controls what happens when an action is started while another is still running.

  • catchup_window (Float) (defaults to: 365 * 24 * 60 * 60.0)

    After a Temporal server is unavailable, amount of time in the past to execute missed actions.

  • pause_on_failure (Boolean) (defaults to: false)

    Whether to pause the schedule if an action fails or times out. Note: For workflows, this only applies after all retries have been exhausted.



750
751
752
753
754
755
756
# File 'lib/temporalio/client/schedule.rb', line 750

def initialize(
  overlap: OverlapPolicy::SKIP,
  catchup_window: 365 * 24 * 60 * 60.0,
  pause_on_failure: false
)
  super
end

Instance Attribute Details

#catchup_windowFloat

Returns After a Temporal server is unavailable, amount of time in the past to execute missed actions.

Returns:

  • (Float)

    After a Temporal server is unavailable, amount of time in the past to execute missed actions.



731
732
733
# File 'lib/temporalio/client/schedule.rb', line 731

def catchup_window
  @catchup_window
end

#overlapOverlapPolicy

Returns Controls what happens when an action is started while another is still running.

Returns:

  • (OverlapPolicy)

    Controls what happens when an action is started while another is still running.



731
732
733
# File 'lib/temporalio/client/schedule.rb', line 731

def overlap
  @overlap
end

#pause_on_failureBoolean

Returns Whether to pause the schedule if an action fails or times out. Note: For workflows, this only applies after all retries have been exhausted.

Returns:

  • (Boolean)

    Whether to pause the schedule if an action fails or times out. Note: For workflows, this only applies after all retries have been exhausted.



731
732
733
# File 'lib/temporalio/client/schedule.rb', line 731

def pause_on_failure
  @pause_on_failure
end