mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-12 16:43:11 +00:00
always disable status thread after checking, and log end of output
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3165 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
4ea40438cf
commit
853f1d7f51
2 changed files with 5 additions and 4 deletions
|
|
@ -39,8 +39,6 @@ def check_urls (aggregate):
|
|||
aggregate.start_threads()
|
||||
# blocks until all urls are checked
|
||||
aggregate.urlqueue.join()
|
||||
status.disable_status()
|
||||
aggregate.logger.end_log_output()
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
linkcheck.log.warn(linkcheck.LOG_CHECK,
|
||||
"keyboard interrupt; waiting for active threads to finish")
|
||||
|
|
@ -48,6 +46,8 @@ def check_urls (aggregate):
|
|||
except:
|
||||
status.internal_error()
|
||||
aggregate.abort()
|
||||
status.disable_status()
|
||||
aggregate.logger.end_log_output()
|
||||
|
||||
|
||||
def get_aggregate (config):
|
||||
|
|
|
|||
|
|
@ -76,12 +76,13 @@ class Aggregate (object):
|
|||
|
||||
def status (self):
|
||||
start_time = time.time()
|
||||
while status.status_is_active():
|
||||
while True:
|
||||
time.sleep(5)
|
||||
if not status.status_is_active():
|
||||
break
|
||||
status.print_status(self.urlqueue, start_time)
|
||||
|
||||
def abort (self):
|
||||
self.urlqueue.do_shutdown()
|
||||
self.urlqueue.join(timeout=10)
|
||||
self.logger.end_log_output()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue