mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-27 03:00:36 +00:00
get new urls from top of queue
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1302 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
b19352b429
commit
2ffb97a855
2 changed files with 5 additions and 1 deletions
|
|
@ -269,9 +269,12 @@ class Configuration (dict):
|
|||
|
||||
|
||||
def getUrl (self):
|
||||
"""get first url in queue and return it"""
|
||||
self.urlsLock.acquire()
|
||||
try:
|
||||
return self.urls.pop()
|
||||
u = self.urls[0]
|
||||
del self.urls[0]
|
||||
return u
|
||||
finally:
|
||||
self.urlsLock.release()
|
||||
|
||||
|
|
|
|||
|
|
@ -604,6 +604,7 @@ class UrlData (object):
|
|||
base = codebase
|
||||
else:
|
||||
base = baseRef
|
||||
debug(NIGHTMARE, "Put url %r in queue"%url)
|
||||
self.config.appendUrl(GetUrlDataFrom(url,
|
||||
self.recursionLevel+1, self.config,
|
||||
parentName=self.url, baseRef=base,
|
||||
|
|
|
|||
Loading…
Reference in a new issue