Last active
December 17, 2019 17:20
-
-
Save foxeg/72ce6fcc34bab9942d6d906ef08031cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def wait_for_cdn_url | |
return "" if Rails.env.test? | |
5.times do | |
@url = fetch_application_document.blackhole_file.url | |
break if URI.parse(@url).host != blackhole_host | |
sleep 1 | |
end | |
@url | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment