Don't close idle db connection during rebuild
This commit is contained in:
parent
da9af181dd
commit
8cf30893f2
2 changed files with 7 additions and 6 deletions
|
@ -45,10 +45,10 @@ class SiteStorage(object):
|
|||
return False
|
||||
|
||||
# Create new databaseobject with the site's schema
|
||||
def openDb(self):
|
||||
def openDb(self, close_idle=False):
|
||||
schema = self.getDbSchema()
|
||||
db_path = self.getPath(schema["db_file"])
|
||||
return Db(schema, db_path)
|
||||
return Db(schema, db_path, close_idle=close_idle)
|
||||
|
||||
def closeDb(self):
|
||||
if self.db:
|
||||
|
@ -77,7 +77,7 @@ class SiteStorage(object):
|
|||
|
||||
if self.db:
|
||||
self.db.close()
|
||||
self.db = self.openDb()
|
||||
self.db = self.openDb(close_idle=True)
|
||||
|
||||
changed_tables = self.db.checkTables()
|
||||
if changed_tables:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue