Move optional files hashfield adding to workermanager for better performance
This commit is contained in:
parent
906f6c65d9
commit
2ab04deded
2 changed files with 6 additions and 9 deletions
|
@ -23,7 +23,6 @@ class ContentManager(object):
|
|||
self.contents = ContentDbDict(site)
|
||||
self.hashfield = PeerHashfield()
|
||||
self.has_optional_files = False
|
||||
self.site.onFileDone.append(lambda inner_path: self.addOptionalFile(inner_path))
|
||||
|
||||
def loadContents(self):
|
||||
if len(self.contents) == 0:
|
||||
|
@ -800,12 +799,6 @@ class ContentManager(object):
|
|||
self.log.error("File not in content.json: %s" % inner_path)
|
||||
return False
|
||||
|
||||
def addOptionalFile(self, inner_path):
|
||||
info = self.getFileInfo(inner_path)
|
||||
if info and info["optional"]:
|
||||
self.log.debug("Downloaded optional file, adding to hashfield: %s" % inner_path)
|
||||
self.hashfield.appendHash(info["sha512"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def testSign():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue