def AddTasks(url, scripttype, queue): db = DictDatabase(scripttype) for i in db.getPaths(): if scripttype == 'cmstype': path = CmsPath(url, db, i) queue.put(path) else: path = DirPath(url, db, i) queue.put(path)
def AddTasksToList(url, scripttype, lst): db = DictDatabase(scripttype) for i in db.getPaths(): if scripttype == 'cmstype': path = CmsPath(url, db, i) lst.append(path) else: path = DirPath(url, db, i) lst.append(path)
def GetScanNum(self): if self.nums >= 0: return self.nums res = 0 for i in self.GetDBScriptType(): res += DictDatabase(i).nums() if self.scanfile: for t in self.scanfile: if not t: continue with open(t, 'rb') as fp: res += len(fp.readlines()) self.nums = res return res