Method: CobwebModule::Crawl#within_queue_limits?
- Defined in:
- lib/crawl.rb
#within_queue_limits? ⇒ Boolean
Returns true if the queue count is calculated to be still within limits when complete
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/crawl.rb', line 48 def within_queue_limits? # if we are limiting by page we can't limit the queue size as we don't know the mime type until retrieved if [:crawl_limit_by_page] return true # if a crawl limit is set, limit queue size to crawled + queue elsif [:crawl_limit].to_i > 0 (queue_counter + crawl_counter) < [:crawl_limit].to_i # no crawl limit set so always within queue limit else true end end |