1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-24 21:04:07 +00:00

Merge pull request #195 from kalessin/floatdelay

download delay in autothrottle was being casted as int, should be float
This commit is contained in:
Pablo Hoffman 2012-11-15 11:18:45 -08:00
commit 0a00e0fd63

View File

@ -21,8 +21,8 @@ class AutoThrottle(object):
self.last_lat = self.START_DELAY, 0.0
def _min_download_delay(self, settings):
return max(settings.getint("AUTOTHROTTLE_MIN_DOWNLOAD_DELAY"),
settings.getint("DOWNLOAD_DELAY"))
return max(settings.getfloat("AUTOTHROTTLE_MIN_DOWNLOAD_DELAY"),
settings.getfloat("DOWNLOAD_DELAY"))
def _max_concurency(self, settings):
delay = self._min_download_delay(settings)