From 17555e2fa6831b7f4dd768c57739801643808371 Mon Sep 17 00:00:00 2001 From: calvin Date: Wed, 17 May 2006 20:19:40 +0000 Subject: [PATCH] use configured timeout on abort, interrupt main git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3241 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/director/aggregator.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linkcheck/director/aggregator.py b/linkcheck/director/aggregator.py index 1d8ab2a7..5d204e7e 100644 --- a/linkcheck/director/aggregator.py +++ b/linkcheck/director/aggregator.py @@ -15,6 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """Aggregate needed object instances for checker threads.""" +import thread import threading import time import logger @@ -30,6 +31,7 @@ def check_target (target): except KeyboardInterrupt: linkcheck.log.warn(linkcheck.LOG_CHECK, "interrupt did not reach the main thread") + thread.interrupt_main() except StandardError: status.internal_error() @@ -95,6 +97,6 @@ class Aggregate (object): def abort (self): self.urlqueue.do_shutdown() try: - self.urlqueue.join(timeout=10) + self.urlqueue.join(timeout=self.config["timeout"]) except linkcheck.cache.urlqueue.Timeout: - pass + linkcheck.log.warn(linkcheck.LOG_CHECK, "Abort timed out")