Skip to content

Commit

Permalink
Wait for backoffs correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtOfCode- committed May 19, 2020
1 parent d1c8a3a commit f2ad30b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/import/api_import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def request(uri, params = {})
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
Expand Down

0 comments on commit f2ad30b

Please sign in to comment.