Class: Temporalio::Client::Schedule::State
- Inherits:
-
Object
- Object
- Temporalio::Client::Schedule::State
- Defined in:
- lib/temporalio/client/schedule.rb
Overview
State of a schedule.
Instance Attribute Summary collapse
-
#limited_actions ⇒ Boolean
If true, remaining actions will be decremented for each action taken.
-
#note ⇒ String?
Human readable message for the schedule.
-
#paused ⇒ Boolean
Whether the schedule is paused.
-
#remaining_actions ⇒ Integer
Actions remaining on this schedule.
Instance Method Summary collapse
-
#initialize(note: nil, paused: false, limited_actions: false, remaining_actions: 0) ⇒ State
constructor
Create a schedule state.
Constructor Details
#initialize(note: nil, paused: false, limited_actions: false, remaining_actions: 0) ⇒ State
Create a schedule state.
777 778 779 780 781 782 783 784 |
# File 'lib/temporalio/client/schedule.rb', line 777 def initialize( note: nil, paused: false, limited_actions: false, remaining_actions: 0 ) super end |
Instance Attribute Details
#limited_actions ⇒ Boolean
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.
756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 |
# File 'lib/temporalio/client/schedule.rb', line 756 class State # @!visibility private def self._from_proto(raw_state) Schedule::State.new( note: Internal::ProtoUtils.string_or(raw_state.notes), paused: raw_state.paused, limited_actions: raw_state.limited_actions, remaining_actions: raw_state.remaining_actions ) end # Create a schedule state. # # @param note [String, nil] Human readable message for the schedule. The system may overwrite this value on # certain conditions like pause-on-failure. # @param paused [Boolean] Whether the schedule is paused. # @param limited_actions [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. # @param remaining_actions [Integer] Actions remaining on this schedule. Once this number hits 0, no further # actions are scheduled automatically. def initialize( note: nil, paused: false, limited_actions: false, remaining_actions: 0 ) super end # @!visibility private def _to_proto Api::Schedule::V1::ScheduleState.new( notes: note || '', paused:, limited_actions:, remaining_actions: ) end end |
#note ⇒ String?
Returns Human readable message for the schedule. The system may overwrite this value on certain conditions like pause-on-failure.
756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 |
# File 'lib/temporalio/client/schedule.rb', line 756 class State # @!visibility private def self._from_proto(raw_state) Schedule::State.new( note: Internal::ProtoUtils.string_or(raw_state.notes), paused: raw_state.paused, limited_actions: raw_state.limited_actions, remaining_actions: raw_state.remaining_actions ) end # Create a schedule state. # # @param note [String, nil] Human readable message for the schedule. The system may overwrite this value on # certain conditions like pause-on-failure. # @param paused [Boolean] Whether the schedule is paused. # @param limited_actions [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. # @param remaining_actions [Integer] Actions remaining on this schedule. Once this number hits 0, no further # actions are scheduled automatically. def initialize( note: nil, paused: false, limited_actions: false, remaining_actions: 0 ) super end # @!visibility private def _to_proto Api::Schedule::V1::ScheduleState.new( notes: note || '', paused:, limited_actions:, remaining_actions: ) end end |
#paused ⇒ Boolean
Returns Whether the schedule is paused.
756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 |
# File 'lib/temporalio/client/schedule.rb', line 756 class State # @!visibility private def self._from_proto(raw_state) Schedule::State.new( note: Internal::ProtoUtils.string_or(raw_state.notes), paused: raw_state.paused, limited_actions: raw_state.limited_actions, remaining_actions: raw_state.remaining_actions ) end # Create a schedule state. # # @param note [String, nil] Human readable message for the schedule. The system may overwrite this value on # certain conditions like pause-on-failure. # @param paused [Boolean] Whether the schedule is paused. # @param limited_actions [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. # @param remaining_actions [Integer] Actions remaining on this schedule. Once this number hits 0, no further # actions are scheduled automatically. def initialize( note: nil, paused: false, limited_actions: false, remaining_actions: 0 ) super end # @!visibility private def _to_proto Api::Schedule::V1::ScheduleState.new( notes: note || '', paused:, limited_actions:, remaining_actions: ) end end |
#remaining_actions ⇒ Integer
Returns Actions remaining on this schedule. Once this number hits 0, no further actions are scheduled automatically.
756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 |
# File 'lib/temporalio/client/schedule.rb', line 756 class State # @!visibility private def self._from_proto(raw_state) Schedule::State.new( note: Internal::ProtoUtils.string_or(raw_state.notes), paused: raw_state.paused, limited_actions: raw_state.limited_actions, remaining_actions: raw_state.remaining_actions ) end # Create a schedule state. # # @param note [String, nil] Human readable message for the schedule. The system may overwrite this value on # certain conditions like pause-on-failure. # @param paused [Boolean] Whether the schedule is paused. # @param limited_actions [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. # @param remaining_actions [Integer] Actions remaining on this schedule. Once this number hits 0, no further # actions are scheduled automatically. def initialize( note: nil, paused: false, limited_actions: false, remaining_actions: 0 ) super end # @!visibility private def _to_proto Api::Schedule::V1::ScheduleState.new( notes: note || '', paused:, limited_actions:, remaining_actions: ) end end |