mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-25 04:23:45 +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:
commit
0a00e0fd63
@ -21,8 +21,8 @@ class AutoThrottle(object):
|
|||||||
self.last_lat = self.START_DELAY, 0.0
|
self.last_lat = self.START_DELAY, 0.0
|
||||||
|
|
||||||
def _min_download_delay(self, settings):
|
def _min_download_delay(self, settings):
|
||||||
return max(settings.getint("AUTOTHROTTLE_MIN_DOWNLOAD_DELAY"),
|
return max(settings.getfloat("AUTOTHROTTLE_MIN_DOWNLOAD_DELAY"),
|
||||||
settings.getint("DOWNLOAD_DELAY"))
|
settings.getfloat("DOWNLOAD_DELAY"))
|
||||||
|
|
||||||
def _max_concurency(self, settings):
|
def _max_concurency(self, settings):
|
||||||
delay = self._min_download_delay(settings)
|
delay = self._min_download_delay(settings)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user