[Zope-Checkins] CVS: Zope/lib/python/Signals - Signals.py:1.2.4.1
Chris McDonough
chrism@zope.com
Thu, 29 Aug 2002 01:31:53 -0400
Update of /cvs-repository/Zope/lib/python/Signals
In directory cvs.zope.org:/tmp/cvs-serv30531/lib/python/Signals
Modified Files:
Tag: chrism-install-branch
Signals.py
Log Message:
CVS up -j from HEAD on chrism-installer-branch.
Sorry folks on various mailing lists whom are subjected to this.
If I knew how to cut down on unnecessary checkin messages to
the lists, I would.
=== Zope/lib/python/Signals/Signals.py 1.2 => 1.2.4.1 ===
--- Zope/lib/python/Signals/Signals.py:1.2 Wed Aug 14 17:51:39 2002
+++ Zope/lib/python/Signals/Signals.py Thu Aug 29 01:31:21 2002
@@ -56,6 +56,19 @@
zLOG.LOG('Z2', zLOG.BLATHER, "Reopened event log")
zLOG.LOG('Z2', zLOG.INFO, "Log files reopened successfully")
+def packHandler():
+ zLOG.LOG('Z2', zLOG.INFO, 'Packing main ZODB database')
+ import Globals
+ try:
+ db = Globals.opened[0]
+ db.pack()
+ zLOG.LOG('Z2', zLOG.INFO,
+ 'Database packing launched or completed successfully')
+ except:
+ zLOG.LOG('Z2', zLOG.INFO,
+ 'Call to pack failed!', error=sys.exc_info())
+
+
def closeall():
"""Helper method to close network and database connections."""
import Globals
@@ -76,3 +89,4 @@
SignalHandler.registerHandler(signal.SIGINT, shutdownHandler)
SignalHandler.registerHandler(signal.SIGHUP, restartHandler)
SignalHandler.registerHandler(signal.SIGUSR2, logfileReopenHandler)
+ SignalHandler.registerHandler(signal.SIGUSR1, packHandler)