mirror of https://github.com/scrapy/scrapy.git
Check pending start_requests before calling _spider_idle() in engine (fixes #706)
This commit is contained in:
parent
4898d96337
commit
7199555e1a
|
|
@ -112,6 +112,7 @@ class ExecutionEngine(object):
|
|||
except StopIteration:
|
||||
slot.start_requests = None
|
||||
except Exception as exc:
|
||||
slot.start_requests = None
|
||||
log.err(None, 'Obtaining request from start requests', \
|
||||
spider=spider)
|
||||
else:
|
||||
|
|
@ -156,7 +157,8 @@ class ExecutionEngine(object):
|
|||
scraper_idle = self.scraper.slot.is_idle()
|
||||
pending = self.slot.scheduler.has_pending_requests()
|
||||
downloading = bool(self.downloader.active)
|
||||
idle = scraper_idle and not (pending or downloading)
|
||||
pending_start_requests = self.slot.start_requests is not None
|
||||
idle = scraper_idle and not (pending or downloading or pending_start_requests)
|
||||
return idle
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Reference in New Issue