[Zope-Checkins] CVS: Zope/lib/python/Signals - Signals.py:1.9
Toby Dickenson
tdickenson@geminidataloggers.com
Wed, 13 Nov 2002 05:38:39 -0500
Update of /cvs-repository/Zope/lib/python/Signals
In directory cvs.zope.org:/tmp/cvs-serv13026/lib/python/Signals
Modified Files:
Signals.py
Log Message:
Merged remaining changes from toby-clean-shutdown-branch. This resolves the overnight problem where storages were not closed if Zope is shut down using the ZMI, and the long-standing problem where storages were closed too soon when shut down using a signal
=== Zope/lib/python/Signals/Signals.py 1.8 => 1.9 ===
--- Zope/lib/python/Signals/Signals.py:1.8 Mon Nov 11 11:10:55 2002
+++ Zope/lib/python/Signals/Signals.py Wed Nov 13 05:38:38 2002
@@ -26,7 +26,6 @@
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)
@@ -34,14 +33,12 @@
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")
sys.exit(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)
@@ -79,16 +76,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