lib/powertrack/streaming/retrier.rb
# Retries the block of code provided according to the configuration of the
# retrier.
Retries the block of code provided according to the configuration of the
retrier.
Retries the block of code provided according to the configuration of the retrier .
def retry(&block)
      while @continue && @retries <= @max_retries
        res = yield
        if @continue
          @retries += 1
          sleep(@backoff.next_interval)
        end
      end
      res
    end
def retry ( & block ) while @continue && @retries <= @max_retries res = yield if @continue @retries += 1 sleep ( @backoff . next_interval ) end end res end
Retries the block of code provided according to the configuration of the
retrier.
Retries the block of code provided according to the configuration of the retrier .
# TODO: manage exceptions
block