Skip to content
Snippets Groups Projects
Commit f2ad30b0 authored by ArtOfCode-'s avatar ArtOfCode-
Browse files

Wait for backoffs correctly

parent d1c8a3a0
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ class APIImport
full_uri.query = params.map { |k, v| "#{k}=#{v}" }.join('&')
if @backoff.present? && @backoff.future?
seconds = @backoff - DateTime.now
seconds = (@backoff - DateTime.now) * 86400
$logger.debug "Waiting #{seconds.to_i}s for backoff"
sleep seconds.to_i
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment