Skip to content

Commit

Permalink
Sleeping consistently.
Browse files Browse the repository at this point in the history
  • Loading branch information
jqr committed Apr 5, 2012
1 parent fd4e559 commit e754fc5
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions runkeeper.rb
Expand Up @@ -172,18 +172,16 @@ def find_and_parse_cached_activity_page
def open_url_and_cache_activity_page
puts " Downloading the activity on #{path}"

# Be a good Net citizen and wait 1 second so we don't pound
# their web site repeatedly
sleep 1

raw_html = open(url).read

# Cache the raw HTML
self.class.cache_file(cache_file_name, raw_html)

doc = Nokogiri::HTML(raw_html)

# Be a good Net citizen and wait 1 second so we don't pound
# their web site repeatedly
sleep 1

doc
Nokogiri::HTML(raw_html)
end

# Get the url for a single user's activities
Expand Down

0 comments on commit e754fc5

Please sign in to comment.