Don't backoff for more than 256 seconds (~4 min) (#13)

This commit is contained in:
Prad Nelluru 2020-04-21 08:26:25 -04:00 committed by GitHub
parent ebf1b57e22
commit 5e5158fe1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -83,7 +83,9 @@ module Muse::Dl
puts ex.backtrace.join("\n ") puts ex.backtrace.join("\n ")
puts "Error. Skipping book: #{url}. Waiting for #{delay_secs} seconds before continuing." puts "Error. Skipping book: #{url}. Waiting for #{delay_secs} seconds before continuing."
sleep(delay_secs) sleep(delay_secs)
delay_secs *= 2 if delay_secs < 256
delay_secs *= 2
end
end end
end end
elsif parser.url elsif parser.url