[Checkins] SVN: Zope/trunk/lib/python/Signals/Signals.py Remove signal-driven pack cruft.

Tres Seaver tseaver at palladion.com
Fri Dec 26 12:57:32 EST 2008


Log message for revision 94365:
  Remove signal-driven pack cruft.

Changed:
  U   Zope/trunk/lib/python/Signals/Signals.py

-=-
Modified: Zope/trunk/lib/python/Signals/Signals.py
===================================================================
--- Zope/trunk/lib/python/Signals/Signals.py	2008-12-26 17:00:16 UTC (rev 94364)
+++ Zope/trunk/lib/python/Signals/Signals.py	2008-12-26 17:57:31 UTC (rev 94365)
@@ -87,19 +87,6 @@
                     handler.rotate()
         logger.info("Log files rotation complete")
 
-def packHandler():
-    """ Packs the main database.  Not safe to call under a signal
-    handler, because it blocks the main thread """
-    logger.info('Packing main ZODB database')
-    import Globals
-    try:
-        db = Globals.opened[0]
-        db.pack()
-        logger.info('Database packing launched or completed successfully')
-    except:
-        logger.exception('Call to pack failed!')
-        
-
 def registerZopeSignals(loggers):
     from signal import SIGTERM, SIGINT
     try:
@@ -122,11 +109,3 @@
         # no restart handler on windows.
         # Log files get 'rotated', not 'reopened'
         SignalHandler.registerHandler(SIGUSR2, LogfileRotateHandler(loggers))
-    # SIGUSR1 is nominally reserved for pack, but we dont have an
-    # implementation that is stable yet because if the signal handler
-    # fires it will be caught in the main thread and all network operations
-    # will cease until it's finished.
-    # (The above is *not* True for Windows - a different thread is used to
-    # catch the signals.  This probably could be switched on for Windows
-    # if anyone cares)
-    #SignalHandler.registerHandler(SIGUSR1, packHandler)



More information about the Checkins mailing list