[Zope-Checkins] CVS: Zope - z2.py:1.83.2.2.2.2
Toby Dickenson
tdickenson@geminidataloggers.com
Wed, 13 Nov 2002 05:14:27 -0500
Update of /cvs-repository/Zope
In directory cvs.zope.org:/tmp/cvs-serv10115
Modified Files:
Tag: toby-clean-shutdown-branch
z2.py
Log Message:
final round of changes so that databases get closed once, and only once. databases are still not closed if zope terminates due to an exception
=== Zope/z2.py 1.83.2.2.2.1 => 1.83.2.2.2.2 ===
--- Zope/z2.py:1.83.2.2.2.1 Thu Oct 10 13:27:52 2002
+++ Zope/z2.py Wed Nov 13 05:13:57 2002
@@ -906,5 +906,11 @@
import Lifetime
Lifetime.loop()
code = sys.ZServerExitCode
+
+zLOG.LOG('z2', zLOG.INFO, "Closing all open ZODB databases")
+import Globals
+for db in Globals.opened:
+ db.close()
+
zLOG.LOG("z2", zLOG.INFO, 'Exiting with code %d' % code )
sys.exit(code)