From 0630e4aaa10c3fb8c79c2542a229f5c0632cddde Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Sun, 24 Sep 2023 19:36:29 +0400 Subject: [PATCH] Fix `scrapy shell`. --- scrapy/crawler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scrapy/crawler.py b/scrapy/crawler.py index 15aec2757..6f54e62e9 100644 --- a/scrapy/crawler.py +++ b/scrapy/crawler.py @@ -404,8 +404,8 @@ class CrawlerProcess(CrawlerRunner): :param bool stop_after_crawl: stop or not the reactor when all crawlers have finished - :param bool install_signal_handlers: whether to install the shutdown - handlers (default: True) + :param bool install_signal_handlers: whether to install the OS signal + handlers from Twisted and Scrapy (default: True) """ from twisted.internet import reactor @@ -426,7 +426,7 @@ class CrawlerProcess(CrawlerRunner): reactor.addSystemEventTrigger( "after", "startup", install_shutdown_handlers, self._signal_shutdown ) - reactor.run() # blocking call + reactor.run(installSignalHandlers=install_signal_handlers) # blocking call def _graceful_stop_reactor(self) -> Deferred: d = self.stop()