Class: Temporalio::Client::Schedule::State

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

Overview

State of a schedule.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(note: nil, paused: false, limited_actions: false, remaining_actions: 0) ⇒ State

Create a schedule state.

Parameters:

  • note (String, nil) (defaults to: nil)

    Human readable message for the schedule. The system may overwrite this value on certain conditions like pause-on-failure.

  • paused (Boolean) (defaults to: false)

    Whether the schedule is paused.

  • limited_actions (Boolean) (defaults to: false)

    If true, remaining actions will be decremented for each action taken. On schedule create, this must be set to true if ‘remaining_actions` is non-zero and left false if `remaining_actions` is zero.

  • remaining_actions (Integer) (defaults to: 0)

    Actions remaining on this schedule. Once this number hits 0, no further actions are scheduled automatically.



809
810
811
812
813
814
815
816
# File 'lib/temporalio/client/schedule.rb', line 809

def initialize(
  note: nil,
  paused: false,
  limited_actions: false,
  remaining_actions: 0
)
  super
end

Instance Attribute Details

#limited_actionsBoolean

Returns If true, remaining actions will be decremented for each action taken. On schedule create, this must be set to true if ‘remaining_actions` is non-zero and left false if `remaining_actions` is zero.

Returns:

  • (Boolean)

    If true, remaining actions will be decremented for each action taken. On schedule create, this must be set to true if ‘remaining_actions` is non-zero and left false if `remaining_actions` is zero.



788
789
790
# File 'lib/temporalio/client/schedule.rb', line 788

def limited_actions
  @limited_actions
end

#noteString?

Returns Human readable message for the schedule. The system may overwrite this value on certain conditions like pause-on-failure.

Returns:

  • (String, nil)

    Human readable message for the schedule. The system may overwrite this value on certain conditions like pause-on-failure.



788
789
790
# File 'lib/temporalio/client/schedule.rb', line 788

def note
  @note
end

#pausedBoolean

Returns Whether the schedule is paused.

Returns:

  • (Boolean)

    Whether the schedule is paused.



788
789
790
# File 'lib/temporalio/client/schedule.rb', line 788

def paused
  @paused
end

#remaining_actionsInteger

Returns Actions remaining on this schedule. Once this number hits 0, no further actions are scheduled automatically.

Returns:

  • (Integer)

    Actions remaining on this schedule. Once this number hits 0, no further actions are scheduled automatically.



788
789
790
# File 'lib/temporalio/client/schedule.rb', line 788

def remaining_actions
  @remaining_actions
end