Don't allow parallel rebuild

This commit is contained in:
shortcutme 2018-09-02 02:24:07 +02:00
parent b84abea670
commit 4fe33268ac
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -114,6 +114,7 @@ class SiteStorage(object):
time.sleep(0.000001) # Context switch to avoid UI block
# Rebuild sql cache
@util.Noparallel()
def rebuildDb(self, delete_db=True):
self.has_db = self.isFile("dbschema.json")
if not self.has_db:
@ -369,7 +370,7 @@ class SiteStorage(object):
inner_path = ""
else:
if path.startswith(self.directory):
inner_path = path[len(self.directory)+1:]
inner_path = path[len(self.directory) + 1:]
else:
raise Exception(u"File not allowed: %s" % path)
return inner_path