Sha256: 879523fe900a3c3ff51d26580e56d463f0d970f7bc5076258b90e98591f9a51e
Contents?: true
Size: 374 Bytes
Versions: 15
Compression:
Stored size: 374 Bytes
Contents
# frozen_string_literal: true module Mihari module Retriable def retry_on_error(times: 3, interval: 10) try = 0 begin try += 1 yield rescue Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE, OpenSSL::SSL::SSLError, Timeout::Error => _e sleep interval retry if try < times raise end end end end
Version data entries
15 entries across 15 versions & 1 rubygems