Commit 08145c1f authored by Hanno Schlichting's avatar Hanno Schlichting

Explicitly close all databases on shutdown, which ensures `Data.fs.index` gets...

Explicitly close all databases on shutdown, which ensures `Data.fs.index` gets written to the file system.
parent 32f93f6d
...@@ -16,6 +16,9 @@ Bugs Fixed ...@@ -16,6 +16,9 @@ Bugs Fixed
Features Added Features Added
++++++++++++++ ++++++++++++++
- Explicitly close all databases on shutdown, which ensures `Data.fs.index`
gets written to the file system.
- Always configure a `blob-dir` in the default skeleton. - Always configure a `blob-dir` in the default skeleton.
- ZPublisher: If `IBrowserPage` is provided by a view, form input is decoded. - ZPublisher: If `IBrowserPage` is provided by a view, form input is decoded.
......
...@@ -76,7 +76,7 @@ def startup(): ...@@ -76,7 +76,7 @@ def startup():
m=imp.find_module('custom_zodb',[configuration.testinghome]) m=imp.find_module('custom_zodb',[configuration.testinghome])
except: except:
m=imp.find_module('custom_zodb',[configuration.instancehome]) m=imp.find_module('custom_zodb',[configuration.instancehome])
except: except Exception:
# if there is no custom_zodb, use the config file specified databases # if there is no custom_zodb, use the config file specified databases
DB = dbtab.getDatabase('/', is_root=1) DB = dbtab.getDatabase('/', is_root=1)
else: else:
......
...@@ -107,6 +107,9 @@ class ZopeStarter: ...@@ -107,6 +107,9 @@ class ZopeStarter:
self.shutdown() self.shutdown()
def shutdown(self): def shutdown(self):
databases = getattr(self.cfg.dbtab, 'databases', {})
for db in databases.values():
db.close()
self.unlinkLockFile() self.unlinkLockFile()
self.unlinkPidFile() self.unlinkPidFile()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment