Fix big site download
This commit is contained in:
parent
73b3c8db55
commit
4890c4cb2f
2 changed files with 4 additions and 1 deletions
|
@ -675,6 +675,9 @@ class ContentManager(object):
|
|||
# Check total site size limit
|
||||
if site_size > site_size_limit:
|
||||
self.log.error("%s: Site too large %s > %s, aborting task..." % (inner_path, site_size, site_size_limit))
|
||||
if inner_path == "content.json" and self.site.settings["size"] == 0:
|
||||
# First content.json download, save site size to display warning
|
||||
self.site.settings["size"] = site_size
|
||||
task = self.site.worker_manager.findTask(inner_path)
|
||||
if task: # Dont try to download from other peers
|
||||
self.site.worker_manager.failTask(task)
|
||||
|
|
|
@ -120,7 +120,7 @@ class SiteManager(object):
|
|||
site.settings["serving"] = True
|
||||
site.saveSettings()
|
||||
if all_file: # Also download user files on first sync
|
||||
site.download(blind_includes=True)
|
||||
site.download(check_size=True, blind_includes=True)
|
||||
else:
|
||||
if all_file:
|
||||
site.download()
|
||||
|
|
Loading…
Reference in a new issue