mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-27 17:44:42 +00:00
add debugging
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3177 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
df7a2076a9
commit
ffeaa3484e
1 changed files with 6 additions and 0 deletions
6
linkcheck/cache/urlqueue.py
vendored
6
linkcheck/cache/urlqueue.py
vendored
|
|
@ -79,6 +79,8 @@ class UrlQueue (Queue.Queue):
|
|||
if self.shutdown:
|
||||
# don't accept more URLs
|
||||
return
|
||||
assert None == linkcheck.log.debug(linkcheck.LOG_CACHE,
|
||||
"queueing %s", url_data)
|
||||
key = url_data.cache_url_key
|
||||
if key in self.checked:
|
||||
# Put at beginning of queue to get consumed quickly.
|
||||
|
|
@ -105,10 +107,14 @@ class UrlQueue (Queue.Queue):
|
|||
"""
|
||||
self.all_tasks_done.acquire()
|
||||
try:
|
||||
assert None == linkcheck.log.debug(linkcheck.LOG_CACHE,
|
||||
"task_done %s", url_data)
|
||||
if url_data is not None:
|
||||
key = url_data.cache_url_key
|
||||
if key is not None and key not in self.checked:
|
||||
self._cache_url(key, url_data)
|
||||
else:
|
||||
assert key not in self.in_progress
|
||||
self.finished_tasks += 1
|
||||
unfinished = self.unfinished_tasks - 1
|
||||
if unfinished <= 0:
|
||||
|
|
|
|||
Loading…
Reference in a new issue