mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-26 13:04:01 +00:00
engine: make it more explicit that we don't need to return the value of nextcall.schedule()
This commit is contained in:
parent
ea3bf6d95d
commit
6e50f94406
@ -95,7 +95,8 @@ class ExecutionEngine(object):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if self.paused:
|
if self.paused:
|
||||||
return slot.nextcall.schedule(5)
|
slot.nextcall.schedule(5)
|
||||||
|
return
|
||||||
|
|
||||||
while not self._needs_backout(spider):
|
while not self._needs_backout(spider):
|
||||||
if not self._next_request_from_scheduler(spider):
|
if not self._next_request_from_scheduler(spider):
|
||||||
@ -235,7 +236,8 @@ class ExecutionEngine(object):
|
|||||||
spider=spider, dont_log=DontCloseSpider)
|
spider=spider, dont_log=DontCloseSpider)
|
||||||
if any(isinstance(x, Failure) and isinstance(x.value, DontCloseSpider) \
|
if any(isinstance(x, Failure) and isinstance(x.value, DontCloseSpider) \
|
||||||
for _, x in res):
|
for _, x in res):
|
||||||
return self.slots[spider].nextcall.schedule(5)
|
self.slots[spider].nextcall.schedule(5)
|
||||||
|
return
|
||||||
|
|
||||||
if self.spider_is_idle(spider):
|
if self.spider_is_idle(spider):
|
||||||
self.close_spider(spider, reason='finished')
|
self.close_spider(spider, reason='finished')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user