lib/dumper/job.rb in dumper-1.3.5 vs lib/dumper/job.rb in dumper-1.3.6
- old
+ new
@@ -83,12 +83,14 @@
retry_count = 0
begin
response = http.request(request)
rescue # Errno::ECONNRESET, Errno::EPIPE, etc.
- raise if retry_count > 3
+ raise if retry_count > 8
retry_count += 1
- log "upload failed: #{$!} - retrying..."
+ fields['file'].rewind
+ log "upload failed: #{$!} - retrying after #{2 ** retry_count}sec..."
+ sleep 2 ** retry_count
retry
end
log "response from S3 = #{response.to_s}"
response