class Fluent::PluginHelper::RetryState::PeriodicRetry

Public Class Methods

new(title, wait, timeout, forever, max_steps, randomize, randomize_width, secondary, secondary_threshold) click to toggle source
# File lib/fluent/plugin_helper/retry_state.rb, line 183
def initialize(title, wait, timeout, forever, max_steps, randomize, randomize_width, secondary, secondary_threshold)
  @retry_wait = wait

  super(title, wait, timeout, forever, max_steps, randomize, randomize_width, secondary, secondary_threshold)

  @next_time = @start + @retry_wait
end

Public Instance Methods

calc_max_retry_timeout(max_steps) click to toggle source
# File lib/fluent/plugin_helper/retry_state.rb, line 195
def calc_max_retry_timeout(max_steps)
  @retry_wait * max_steps
end
naive_next_time(retry_next_times) click to toggle source
# File lib/fluent/plugin_helper/retry_state.rb, line 191
def naive_next_time(retry_next_times)
  current_time + randomize(@retry_wait)
end