lib/lull.rb
# use rest-client with retry
use rest-client with retry
use rest - client with retry
def rest_try(tries = 3)
    tries.times do |i|
      make_call
      break if (200..299).include? @response.code
      puts "Failed #{@meth} on #{@url}, retry...#{i + 1}"
      sleep 3 unless i > 1
    end
    @response
  end
def rest_try ( tries = 3 ) tries . times do | i | make_call break if ( 200 .. 299 ) . include? @response . code puts "Failed #{@meth} on #{@url}, retry...#{i + 1}" sleep 3 unless i > 1 end @response end
use rest-client with retry
use rest - client with retry
tries
<not_specific>