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

This commit is contained in:
Prad Nelluru 2020-04-20 12:19:32 -04:00 committed by GitHub
parent ebf1b57e22
commit cea7dd1702
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

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