Commit 50320274 authored by Hanno Schlichting's avatar Hanno Schlichting

Backport c122072 from trunk - close databases on shutdown to write out .index file

parent 52ad803b
......@@ -8,12 +8,15 @@ http://docs.zope.org/zope2/releases/.
2.13.19 (unreleased)
--------------------
- LP #930812: Scrub headers a bit more.
- Updated distributions:
- tempstorage = 2.12.2
- Explicitly close all databases on shutdown, which ensures `Data.fs.index`
gets written to the file system.
- LP #930812: Scrub headers a bit more.
- Fix lock and pid file handling on Windows. On other platforms
starting Zope tolerated existing or locked files, this now also
works on Windows.
......
......@@ -76,7 +76,7 @@ def startup():
m=imp.find_module('custom_zodb',[configuration.testinghome])
except:
m=imp.find_module('custom_zodb',[configuration.instancehome])
except:
except Exception:
# if there is no custom_zodb, use the config file specified databases
DB = dbtab.getDatabase('/', is_root=1)
else:
......
......@@ -108,6 +108,9 @@ class ZopeStarter:
self.shutdown()
def shutdown(self):
databases = getattr(self.cfg.dbtab, 'databases', {})
for db in databases.values():
db.close()
self.unlinkLockFile()
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