Class: Temporalio::Client::Schedule::Info

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

Overview

Information about a schedule.

Instance Attribute Summary collapse

Instance Attribute Details

#created_atTime

Returns When the schedule was created.

Returns:

  • (Time)

    When the schedule was created.



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/temporalio/client/schedule.rb', line 131

class Info
  # @!visibility private
  def initialize(raw_info:)
    # steep:ignore:start
    super(
      num_actions: raw_info.action_count,
      num_actions_missed_catchup_window: raw_info.missed_catchup_window,
      num_actions_skipped_overlap: raw_info.overlap_skipped,
      running_actions: raw_info.running_workflows.map do |w|
        ActionExecution::StartWorkflow.new(raw_execution: w)
      end,
      recent_actions: raw_info.recent_actions.map { |a| ActionResult.new(raw_result: a) },
      next_action_times: raw_info.future_action_times.map { |t| Internal::ProtoUtils.timestamp_to_time(t) },
      created_at: Internal::ProtoUtils.timestamp_to_time(raw_info.create_time),
      last_updated_at: Internal::ProtoUtils.timestamp_to_time(raw_info.update_time)
    )
    # steep:ignore:end
  end
end

#last_updated_atTime?

Returns When the schedule was last updated.

Returns:

  • (Time, nil)

    When the schedule was last updated.



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/temporalio/client/schedule.rb', line 131

class Info
  # @!visibility private
  def initialize(raw_info:)
    # steep:ignore:start
    super(
      num_actions: raw_info.action_count,
      num_actions_missed_catchup_window: raw_info.missed_catchup_window,
      num_actions_skipped_overlap: raw_info.overlap_skipped,
      running_actions: raw_info.running_workflows.map do |w|
        ActionExecution::StartWorkflow.new(raw_execution: w)
      end,
      recent_actions: raw_info.recent_actions.map { |a| ActionResult.new(raw_result: a) },
      next_action_times: raw_info.future_action_times.map { |t| Internal::ProtoUtils.timestamp_to_time(t) },
      created_at: Internal::ProtoUtils.timestamp_to_time(raw_info.create_time),
      last_updated_at: Internal::ProtoUtils.timestamp_to_time(raw_info.update_time)
    )
    # steep:ignore:end
  end
end

#next_action_timesArray<Time>

Returns Next 10 scheduled action times.

Returns:

  • (Array<Time>)

    Next 10 scheduled action times.



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/temporalio/client/schedule.rb', line 131

class Info
  # @!visibility private
  def initialize(raw_info:)
    # steep:ignore:start
    super(
      num_actions: raw_info.action_count,
      num_actions_missed_catchup_window: raw_info.missed_catchup_window,
      num_actions_skipped_overlap: raw_info.overlap_skipped,
      running_actions: raw_info.running_workflows.map do |w|
        ActionExecution::StartWorkflow.new(raw_execution: w)
      end,
      recent_actions: raw_info.recent_actions.map { |a| ActionResult.new(raw_result: a) },
      next_action_times: raw_info.future_action_times.map { |t| Internal::ProtoUtils.timestamp_to_time(t) },
      created_at: Internal::ProtoUtils.timestamp_to_time(raw_info.create_time),
      last_updated_at: Internal::ProtoUtils.timestamp_to_time(raw_info.update_time)
    )
    # steep:ignore:end
  end
end

#num_actionsInteger

Returns Number of actions taken by this schedule.

Returns:

  • (Integer)

    Number of actions taken by this schedule.



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/temporalio/client/schedule.rb', line 131

class Info
  # @!visibility private
  def initialize(raw_info:)
    # steep:ignore:start
    super(
      num_actions: raw_info.action_count,
      num_actions_missed_catchup_window: raw_info.missed_catchup_window,
      num_actions_skipped_overlap: raw_info.overlap_skipped,
      running_actions: raw_info.running_workflows.map do |w|
        ActionExecution::StartWorkflow.new(raw_execution: w)
      end,
      recent_actions: raw_info.recent_actions.map { |a| ActionResult.new(raw_result: a) },
      next_action_times: raw_info.future_action_times.map { |t| Internal::ProtoUtils.timestamp_to_time(t) },
      created_at: Internal::ProtoUtils.timestamp_to_time(raw_info.create_time),
      last_updated_at: Internal::ProtoUtils.timestamp_to_time(raw_info.update_time)
    )
    # steep:ignore:end
  end
end

#num_actions_missed_catchup_windowInteger

Returns Number of times an action was skipped due to missing the catchup window.

Returns:

  • (Integer)

    Number of times an action was skipped due to missing the catchup window.



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/temporalio/client/schedule.rb', line 131

class Info
  # @!visibility private
  def initialize(raw_info:)
    # steep:ignore:start
    super(
      num_actions: raw_info.action_count,
      num_actions_missed_catchup_window: raw_info.missed_catchup_window,
      num_actions_skipped_overlap: raw_info.overlap_skipped,
      running_actions: raw_info.running_workflows.map do |w|
        ActionExecution::StartWorkflow.new(raw_execution: w)
      end,
      recent_actions: raw_info.recent_actions.map { |a| ActionResult.new(raw_result: a) },
      next_action_times: raw_info.future_action_times.map { |t| Internal::ProtoUtils.timestamp_to_time(t) },
      created_at: Internal::ProtoUtils.timestamp_to_time(raw_info.create_time),
      last_updated_at: Internal::ProtoUtils.timestamp_to_time(raw_info.update_time)
    )
    # steep:ignore:end
  end
end

#num_actions_skipped_overlapInteger

Returns Number of actions skipped due to overlap.

Returns:

  • (Integer)

    Number of actions skipped due to overlap.



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/temporalio/client/schedule.rb', line 131

class Info
  # @!visibility private
  def initialize(raw_info:)
    # steep:ignore:start
    super(
      num_actions: raw_info.action_count,
      num_actions_missed_catchup_window: raw_info.missed_catchup_window,
      num_actions_skipped_overlap: raw_info.overlap_skipped,
      running_actions: raw_info.running_workflows.map do |w|
        ActionExecution::StartWorkflow.new(raw_execution: w)
      end,
      recent_actions: raw_info.recent_actions.map { |a| ActionResult.new(raw_result: a) },
      next_action_times: raw_info.future_action_times.map { |t| Internal::ProtoUtils.timestamp_to_time(t) },
      created_at: Internal::ProtoUtils.timestamp_to_time(raw_info.create_time),
      last_updated_at: Internal::ProtoUtils.timestamp_to_time(raw_info.update_time)
    )
    # steep:ignore:end
  end
end

#recent_actionsArray<ActionResult>

Returns 10 most recent actions, oldest first.

Returns:

  • (Array<ActionResult>)

    10 most recent actions, oldest first.



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/temporalio/client/schedule.rb', line 131

class Info
  # @!visibility private
  def initialize(raw_info:)
    # steep:ignore:start
    super(
      num_actions: raw_info.action_count,
      num_actions_missed_catchup_window: raw_info.missed_catchup_window,
      num_actions_skipped_overlap: raw_info.overlap_skipped,
      running_actions: raw_info.running_workflows.map do |w|
        ActionExecution::StartWorkflow.new(raw_execution: w)
      end,
      recent_actions: raw_info.recent_actions.map { |a| ActionResult.new(raw_result: a) },
      next_action_times: raw_info.future_action_times.map { |t| Internal::ProtoUtils.timestamp_to_time(t) },
      created_at: Internal::ProtoUtils.timestamp_to_time(raw_info.create_time),
      last_updated_at: Internal::ProtoUtils.timestamp_to_time(raw_info.update_time)
    )
    # steep:ignore:end
  end
end

#running_actionsArray<ActionExecution>

Returns Currently running actions.

Returns:



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/temporalio/client/schedule.rb', line 131

class Info
  # @!visibility private
  def initialize(raw_info:)
    # steep:ignore:start
    super(
      num_actions: raw_info.action_count,
      num_actions_missed_catchup_window: raw_info.missed_catchup_window,
      num_actions_skipped_overlap: raw_info.overlap_skipped,
      running_actions: raw_info.running_workflows.map do |w|
        ActionExecution::StartWorkflow.new(raw_execution: w)
      end,
      recent_actions: raw_info.recent_actions.map { |a| ActionResult.new(raw_result: a) },
      next_action_times: raw_info.future_action_times.map { |t| Internal::ProtoUtils.timestamp_to_time(t) },
      created_at: Internal::ProtoUtils.timestamp_to_time(raw_info.create_time),
      last_updated_at: Internal::ProtoUtils.timestamp_to_time(raw_info.update_time)
    )
    # steep:ignore:end
  end
end