Sha256: 07c9ba31b246d3550cc5e0f65d3bd2f18d8383a9e6ab74587bf65c666f8a78c6
Contents?: true
Size: 446 Bytes
Versions: 62
Compression:
Stored size: 446 Bytes
Contents
module S3Website class Retry def self.run_with_retry(sleep_milliseconds = 3.000) attempt = 0 begin yield rescue Exception => e $stderr.puts "Exception Occurred: #{e.message} (#{e.class}) Retrying in 3 seconds..." sleep sleep_milliseconds attempt += 1 if attempt <= 3 retry else raise RetryAttemptsExhaustedError end end end end end
Version data entries
62 entries across 62 versions & 2 rubygems