[Zope-Checkins]
SVN: Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ZCatalog.py
integrated into the ZMI
Andreas Jung
andreas at andreas-jung.com
Fri Jul 16 01:31:43 EDT 2004
Log message for revision 26562:
integrated into the ZMI
Changed:
U Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ZCatalog.py
-=-
Modified: Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ZCatalog.py
===================================================================
--- Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ZCatalog.py 2004-07-16 05:25:10 UTC (rev 26561)
+++ Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ZCatalog.py 2004-07-16 05:31:43 UTC (rev 26562)
@@ -38,6 +38,7 @@
import urllib, time, sys
import string,logging
from IZCatalog import IZCatalog
+from ProgressHandler import ZLogHandler
LOG = logging.getLogger('Zope.ZCatalog')
@@ -510,7 +511,9 @@
message='No items were specified!',
action = "./manage_catalogIndexes",)
- self.reindexIndex(ids, REQUEST)
+ pgthreshold = self._getProgressThreshold()
+ handler = (pgthreshold > 0) and ZLogHandler(pgthreshold) or None
+ self.reindexIndex(ids, REQUEST, handler)
if REQUEST and RESPONSE:
RESPONSE.redirect(
@@ -886,6 +889,11 @@
RESPONSE.redirect(
URL1 + '/manage_main?manage_tabs_message=Catalog%20Changed')
+ def _getProgressThreshold(self):
+ if not hasattr(self, 'pgthreshold'):
+ self.pgthreshold = 0
+ return self.pgthreshold
+
def manage_convertBTrees(self, threshold=200):
"""Convert the catalog's data structures to use BTrees package"""
assert type(threshold) is type(0)
More information about the Zope-Checkins
mailing list