Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

commented debug lines in last commit

olveyrae3f70a81013a
diff --git a/scrapy/trunk/scrapy/contrib/spidermiddleware/limit.py b/scrapy/trunk/scrapy/contrib/spidermiddleware/limit.py
index 0f78e995c..0b459baf1 100644
--- a/scrapy/trunk/scrapy/contrib/spidermiddleware/limit.py
+++ b/scrapy/trunk/scrapy/contrib/spidermiddleware/limit.py
@@ -5,7 +5,7 @@ would result in an excess over the allowed limit of scheduler request queue,
will be filtered out.
The limit is setted from the spider attribute "requests_queue_size". If not
found, from the scrapy setting "REQUESTS_QUEUE_SIZE". If not found, no limit
-will be applied. If given a value of 0, no limit will be applied.
+will be applied. If given a value of 0, no limit will be applied.
"""
from scrapy.core.engine import scrapyengine
from scrapy.conf import settings
@@ -13,7 +13,7 @@ from scrapy.http import Request
from scrapy.core import log
class RequestLimitMiddleware(object):
- _last_queue_size = 0
+ #_last_queue_size = 0
def process_result(self, response, result, spider):
requests = []
other = []
@@ -29,7 +29,7 @@ class RequestLimitMiddleware(object):
if dropped:
for r in dropped:
log.msg("Ignoring link (max schedule queue size reached): %s " % r.url, level=log.WARNING, domain=spider.domain_name)
- actual_size = len(scrapyengine.scheduler.pending_requests[spider.domain_name])
- log.msg("queue size: %d (%+d)" % (actual_size, actual_size - self._last_queue_size) )
- self._last_queue_size = actual_size
+ #actual_size = len(scrapyengine.scheduler.pending_requests[spider.domain_name])
+ #log.msg("queue size: %d (%+d)" % (actual_size, actual_size - self._last_queue_size) )
+ #self._last_queue_size = actual_size
return accepted + other