Fix content.json retry
This commit is contained in:
parent
1dd488ef89
commit
135a9b8f5c
1 changed files with 9 additions and 1 deletions
|
@ -214,10 +214,18 @@ class Site(object):
|
|||
|
||||
# Retry download bad files
|
||||
def retryBadFiles(self, force=False):
|
||||
self.log.debug("Retry %s bad files" % len(self.bad_files))
|
||||
content_inner_paths = []
|
||||
for bad_file, tries in self.bad_files.items():
|
||||
if force or random.randint(0, min(40, tries)) < 4: # Larger number tries = less likely to check every 15min
|
||||
if bad_file.endswith("content.json"):
|
||||
content_inner_paths.append(bad_file)
|
||||
else:
|
||||
self.needFile(bad_file, update=True, blocking=False)
|
||||
|
||||
if content_inner_paths:
|
||||
self.pooledDownloadContent(content_inner_paths)
|
||||
|
||||
# Download all files of the site
|
||||
@util.Noparallel(blocking=False)
|
||||
def download(self, check_size=False, blind_includes=False):
|
||||
|
|
Loading…
Reference in a new issue