[Zope-Checkins] CVS: Zope/lib/python/Signals - Signals.py:1.3.2.1.2.2
Toby Dickenson
tdickenson@geminidataloggers.com
Wed, 13 Nov 2002 05:13:58 -0500
Update of /cvs-repository/Zope/lib/python/Signals
In directory cvs.zope.org:/tmp/cvs-serv10115/lib/python/Signals
Modified Files:
Tag: toby-clean-shutdown-branch
Signals.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/lib/python/Signals/Signals.py 1.3.2.1.2.1 => 1.3.2.1.2.2 ===
--- Zope/lib/python/Signals/Signals.py:1.3.2.1.2.1 Thu Oct 10 13:27:54 2002
+++ Zope/lib/python/Signals/Signals.py Wed Nov 13 05:13:57 2002
@@ -26,21 +26,18 @@
def shutdownFastHandler():
"""Shutdown cleanly on SIGTERM. This is registered first,
so it should be called after all other handlers."""
- closeall()
zLOG.LOG('Z2', zLOG.INFO , "Shutting down fast")
Lifetime.shutdown(0,fast=1)
def shutdownHandler():
"""Shutdown cleanly on SIGINT. This is registered first,
so it should be called after all other handlers."""
- closeall()
zLOG.LOG('Z2', zLOG.INFO , "Shutting down")
Lifetime.shutdown(0)
def restartHandler():
"""Restart cleanly on SIGHUP. This is registered first, so it
should be called after all other SIGHUP handlers."""
- closeall()
zLOG.LOG('Z2', zLOG.INFO , "Restarting")
Lifetime.shutdown(1)
@@ -76,16 +73,6 @@
zLOG.LOG('Z2', zLOG.INFO,
'Call to pack failed!', error=sys.exc_info())
-
-def closeall():
- """Helper method to close database connections. This also used
- to close network connections, but that hosed ZEO clients in some
- instances, so we don't do that anymore"""
- import Globals
-
- zLOG.LOG('Z2', zLOG.INFO, "Closing all open ZODB databases")
- for db in Globals.opened:
- db.close()
def registerZopeSignals():
import signal