def __signal_handler(self, signum, frame):
"""On sigint (e.g. CTRL+C) stop the crawler.
Args:
signum (int): The signal number.
frame (obj): The current stack frame.
"""
if self.stopping:
return
self.stopping = True
colorlog.getLogger().warning("Received SIGINT, stopping the crawling threads safely. This could take up to 15 seconds (the thread timeout).")
评论列表
文章目录