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.
801 802 803 804 805 806 807 808 |
# File 'lib/temporalio/client/schedule.rb', line 801 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.
780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 |
# File 'lib/temporalio/client/schedule.rb', line 780 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.
780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 |
# File 'lib/temporalio/client/schedule.rb', line 780 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.
780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 |
# File 'lib/temporalio/client/schedule.rb', line 780 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.
780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 |
# File 'lib/temporalio/client/schedule.rb', line 780 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 |