Class: Temporalio::Client::Schedule::Backfill

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

Overview

Time period and policy for actions taken as if the time passed right now.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(start_at:, end_at:, overlap: nil) ⇒ Backfill

Create backfill.

Parameters:

  • start_at (Time)

    Start of the range to evaluate the schedule in. This is exclusive.

  • end_at (Time)

    End of the range to evaluate the schedule in. This is inclusive.

  • overlap (OverlapPolicy) (defaults to: nil)

    Overlap policy.



336
337
338
339
340
341
342
# File 'lib/temporalio/client/schedule.rb', line 336

def initialize(
  start_at:,
  end_at:,
  overlap: nil
)
  super
end

Instance Attribute Details

#end_atTime

Returns End of the range to evaluate the schedule in. This is inclusive.

Returns:

  • (Time)

    End of the range to evaluate the schedule in. This is inclusive.



330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
# File 'lib/temporalio/client/schedule.rb', line 330

class Backfill
  # Create backfill.
  #
  # @param start_at [Time] Start of the range to evaluate the schedule in. This is exclusive.
  # @param end_at [Time] End of the range to evaluate the schedule in. This is inclusive.
  # @param overlap [OverlapPolicy] Overlap policy.
  def initialize(
    start_at:,
    end_at:,
    overlap: nil
  )
    super
  end

  # @!visibility private
  def _to_proto
    Api::Schedule::V1::BackfillRequest.new(
      start_time: Internal::ProtoUtils.time_to_timestamp(start_at),
      end_time: Internal::ProtoUtils.time_to_timestamp(end_at),
      overlap_policy: overlap || Api::Enums::V1::ScheduleOverlapPolicy::SCHEDULE_OVERLAP_POLICY_UNSPECIFIED
    )
  end
end

#overlapOverlapPolicy

Returns Overlap policy.

Returns:



330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
# File 'lib/temporalio/client/schedule.rb', line 330

class Backfill
  # Create backfill.
  #
  # @param start_at [Time] Start of the range to evaluate the schedule in. This is exclusive.
  # @param end_at [Time] End of the range to evaluate the schedule in. This is inclusive.
  # @param overlap [OverlapPolicy] Overlap policy.
  def initialize(
    start_at:,
    end_at:,
    overlap: nil
  )
    super
  end

  # @!visibility private
  def _to_proto
    Api::Schedule::V1::BackfillRequest.new(
      start_time: Internal::ProtoUtils.time_to_timestamp(start_at),
      end_time: Internal::ProtoUtils.time_to_timestamp(end_at),
      overlap_policy: overlap || Api::Enums::V1::ScheduleOverlapPolicy::SCHEDULE_OVERLAP_POLICY_UNSPECIFIED
    )
  end
end

#start_atTime

Returns Start of the range to evaluate the schedule in. This is exclusive.

Returns:

  • (Time)

    Start of the range to evaluate the schedule in. This is exclusive.



330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
# File 'lib/temporalio/client/schedule.rb', line 330

class Backfill
  # Create backfill.
  #
  # @param start_at [Time] Start of the range to evaluate the schedule in. This is exclusive.
  # @param end_at [Time] End of the range to evaluate the schedule in. This is inclusive.
  # @param overlap [OverlapPolicy] Overlap policy.
  def initialize(
    start_at:,
    end_at:,
    overlap: nil
  )
    super
  end

  # @!visibility private
  def _to_proto
    Api::Schedule::V1::BackfillRequest.new(
      start_time: Internal::ProtoUtils.time_to_timestamp(start_at),
      end_time: Internal::ProtoUtils.time_to_timestamp(end_at),
      overlap_policy: overlap || Api::Enums::V1::ScheduleOverlapPolicy::SCHEDULE_OVERLAP_POLICY_UNSPECIFIED
    )
  end
end