Skip to content

Commit

Permalink
Give up user's content.json after 5 retrys
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed Aug 16, 2016
1 parent b40b3e2 commit 274414a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Site/Site.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,11 @@ def needFile(self, inner_path, update=False, blocking=True, peer=None, priority=
return False # Still no info for file
if "cert_signers" in file_info and not file_info["content_inner_path"] in self.content_manager.contents:
self.log.debug("Missing content.json for requested user file: %s" % inner_path)
if self.bad_files.get(file_info["content_inner_path"], 0) > 5:
self.log.debug("File %s not reachable: retry %s" % (
inner_path, self.bad_files.get(file_info["content_inner_path"], 0)
))
return False
self.downloadContent(file_info["content_inner_path"], download_files=False)

task = self.worker_manager.addTask(inner_path, peer, priority=priority)
Expand Down

0 comments on commit 274414a

Please sign in to comment.