Erase unneeded flag in CrawlerProcess.start

This commit is contained in:
Julia Medina 2014-09-07 13:03:34 -03:00
parent d513b5a542
commit 51532af69a
2 changed files with 2 additions and 7 deletions

View File

@ -58,14 +58,13 @@ class Command(ScrapyCommand):
crawler.engine = crawler._create_engine()
crawler.engine.start()
self.crawler_process.start(start_reactor=False)
self._start_crawler_thread()
shell = Shell(crawler, update_vars=self.update_vars, code=opts.code)
shell.start(url=url)
def _start_crawler_thread(self):
t = Thread(target=self.crawler_process._start_reactor,
t = Thread(target=self.crawler_process.start,
kwargs={'stop_after_crawl': False})
t.daemon = True
t.start()

View File

@ -133,11 +133,7 @@ class CrawlerProcess(CrawlerRunner):
self._stop_logging()
reactor.callFromThread(self._stop_reactor)
def start(self, stop_after_crawl=True, start_reactor=True):
if start_reactor:
self._start_reactor(stop_after_crawl)
def _start_reactor(self, stop_after_crawl=True):
def start(self, stop_after_crawl=True):
if stop_after_crawl:
d = defer.DeferredList(self.crawl_deferreds)
if d.called: