Commit a3ed0554 authored by Andreas Jung's avatar Andreas Jung

added ZMI configuration option for log reindexing progress

parent 79d3b778
...@@ -127,6 +127,7 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -127,6 +127,7 @@ class ZCatalog(Folder, Persistent, Implicit):
'manage_catalogClear', 'manage_addColumn', 'manage_delColumn', 'manage_catalogClear', 'manage_addColumn', 'manage_delColumn',
'manage_addIndex', 'manage_delIndex', 'manage_clearIndex', 'manage_addIndex', 'manage_delIndex', 'manage_clearIndex',
'manage_reindexIndex', 'manage_main', 'availableSplitters', 'manage_reindexIndex', 'manage_main', 'availableSplitters',
'manage_setProgress',
# these two are deprecated: # these two are deprecated:
'manage_delColumns', 'manage_deleteIndex' 'manage_delColumns', 'manage_deleteIndex'
...@@ -875,6 +876,16 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -875,6 +876,16 @@ class ZCatalog(Folder, Persistent, Implicit):
'%s unchanged.' % (len(fixed), len(removed), unchanged), '%s unchanged.' % (len(fixed), len(removed), unchanged),
action='./manage_main') action='./manage_main')
def manage_setProgress(self, pgthreshold=0, RESPONSE=None, URL1=None):
"""Set parameter to perform logging of reindexing operations very
'pgthreshold' objects
"""
self.pgthreshold = pgthreshold
if RESPONSE:
RESPONSE.redirect(
URL1 + '/manage_main?manage_tabs_message=Catalog%20Changed')
def manage_convertBTrees(self, threshold=200): def manage_convertBTrees(self, threshold=200):
"""Convert the catalog's data structures to use BTrees package""" """Convert the catalog's data structures to use BTrees package"""
assert type(threshold) is type(0) assert type(threshold) is type(0)
......
...@@ -36,6 +36,19 @@ ...@@ -36,6 +36,19 @@
</form> </form>
</td> </td>
</tr> </tr>
<tr>
<td align="left" valign="top">
<p class="form-help">Log progress of reindexing every N objects to the Zope logger
</p>
</td>
<td align="right" valign="top">
<form action="&dtml-URL1;">
<input type="text" name="pgthreshold:int" value="<dtml-var pgthreshold missing="0">">
<input class="form-element" type="submit"
name="manage_setProgress:method" value=" Change ">
</form>
</td>
</tr>
<tr> <tr>
<td> <td>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment