Rev3165, Avoid UI block when rubilding a merger site
This commit is contained in:
parent
e86375f721
commit
8ab7d26cd1
2 changed files with 5 additions and 1 deletions
|
@ -258,6 +258,7 @@ class SiteStoragePlugin(object):
|
|||
for address, merged_type in merged_db.iteritems()
|
||||
if merged_type in merger_types
|
||||
]
|
||||
found = 0
|
||||
for merged_site in merged_sites:
|
||||
self.log.debug("Loading merged site: %s" % merged_site)
|
||||
merged_type = merged_db[merged_site.address]
|
||||
|
@ -280,6 +281,9 @@ class SiteStoragePlugin(object):
|
|||
yield merged_inner_path, merged_site.storage.getPath(file_inner_path)
|
||||
else:
|
||||
merged_site.log.error("[MISSING] %s" % file_inner_path)
|
||||
found += 1
|
||||
if found % 100 == 0:
|
||||
time.sleep(0.000001) # Context switch to avoid UI block
|
||||
|
||||
# Also notice merger sites on a merged site file change
|
||||
def onUpdated(self, inner_path, file=None):
|
||||
|
|
|
@ -10,7 +10,7 @@ class Config(object):
|
|||
|
||||
def __init__(self, argv):
|
||||
self.version = "0.6.0"
|
||||
self.rev = 3164
|
||||
self.rev = 3165
|
||||
self.argv = argv
|
||||
self.action = None
|
||||
self.config_file = "zeronet.conf"
|
||||
|
|
Loading…
Reference in a new issue