Skip to content
Browse files

added timer back

  • Loading branch information...
1 parent c962206 commit 4f6fd88757af449c9856b066150a496e12482b53 @mgornick committed Oct 7, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 app/models/trademark.rb
View
4 app/models/trademark.rb
@@ -83,9 +83,13 @@ def self.scrape
File.delete(home_page)
Trademark.all.each do |t|
+ start_time = Time.now
puts "Working on " + t.term
t.perform_searches
+ end_time = Time.now
+ single_trademark_time = end_time - start_time
incomplete = Trademark.count(:conditions => {:complete => nil})
+ puts "Estimated time remaining to complete search: " + (single_trademark_time * incomplete/3600).to_s + " hours"
end
return true

0 comments on commit 4f6fd88

Please sign in to comment.
Something went wrong with that request. Please try again.