Here are the examples of the python api scrapy.utils.ossignal.install_shutdown_handlers taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
3 Examples
3
Source : crawler.py
with MIT License
from autofelix
with MIT License
from autofelix
def __init__(self, settings=None, install_root_handler=True):
super(CrawlerProcess, self).__init__(settings)
install_shutdown_handlers(self._signal_shutdown)
configure_logging(self.settings, install_root_handler)
log_scrapy_info(self.settings)
def _signal_shutdown(self, signum, _):
3
Source : crawler.py
with MIT License
from autofelix
with MIT License
from autofelix
def _signal_shutdown(self, signum, _):
install_shutdown_handlers(self._signal_kill)
signame = signal_names[signum]
logger.info("Received %(signame)s, shutting down gracefully. Send again to force ",
{'signame': signame})
reactor.callFromThread(self._graceful_stop_reactor)
def _signal_kill(self, signum, _):
3
Source : crawler.py
with MIT License
from autofelix
with MIT License
from autofelix
def _signal_kill(self, signum, _):
install_shutdown_handlers(signal.SIG_IGN)
signame = signal_names[signum]
logger.info('Received %(signame)s twice, forcing unclean shutdown',
{'signame': signame})
reactor.callFromThread(self._stop_reactor)
def start(self, stop_after_crawl=True):