def reset(self): # URLs which failed with any error self._numfailed = 0 # URLs which failed even after a re-download self._numfailed2 = 0 # URLs which were retried self._numretried = 0 self.cache = None self.savedfiles = 0 self.reposfiles = 0 self.cachefiles = 0 self.filteredfiles = 0 # Config object self._cfg = objects.config # Dictionary of servers crawled and # their meta-data. Meta-data is # a dictionary which currently # has only one entry. # i.e accept-ranges. self._serversdict = {} # byte count self.bytes = 0L # saved bytes count self.savedbytes = 0L # Redownload flag self._redownload = False # Mirror manager self.mirrormgr = HarvestManMirrorManager.getInstance() # Condition object for synchronization self.cond = threading.Condition(threading.Lock()) self._urldb = None self.collections = None
def __init__(self, threadpool): self._pool = threadpool self._pool._monitor = self self.lock = threading.Lock() self._failedurls = [] self._listfailed = [] self._flag = False # Mirror manager self.mirrormgr = HarvestManMirrorManager.getInstance() # initialize threading threading.Thread.__init__(self, None, None, "Monitor")