[Erp5-report] r17559 - /erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/porta...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Nov 13 17:41:59 CET 2007


Author: aurel
Date: Tue Nov 13 17:41:58 2007
New Revision: 17559

URL: http://svn.erp5.org?rev=17559&view=rev
Log:
allow to give start_tree and stop_tree id when reindexing HBTree folder in order not to reindex all the module

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_reindexAll.xml

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml?rev=17559&r1=17558&r2=17559&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml Tue Nov 13 17:41:58 2007
@@ -85,7 +85,10 @@
                                          object_tag=tag,\n
                                          object_priority=higher_priority,\n
                                          sql_catalog_id=sql_catalog_id,\n
-                                         passive_commit=passive_commit)\n
+                                         passive_commit=passive_commit,\n
+                                         start_tree=start_tree,\n
+                                         stop_tree=stop_tree,)\n
+\n
     \n
 print "#### Indexing translations ####"\n
 context.ERP5Site_updateTranslationTable(sql_catalog_id=sql_catalog_id)\n
@@ -107,7 +110,7 @@
                                          object_after_tag=object_after_tag,\n
                                          object_priority=higher_priority,\n
                                          sql_catalog_id=sql_catalog_id,\n
-                                         passive_commit=passive_commit)\n
+                                         passive_commit=passive_commit,)\n
 \n
 print "#### Indexing alarms ####"\n
 print "#### Indexing preferences ####"\n
@@ -127,7 +130,7 @@
                                            object_after_tag=object_after_tag,\n
                                            object_priority=object_priority,\n
                                            sql_catalog_id=sql_catalog_id,\n
-                                           passive_commit=passive_commit)\n
+                                           passive_commit=passive_commit,)\n
 \n
 # We index simulation first to make sure we can calculate tests\n
 # (ie. related quantity)\n
@@ -147,7 +150,7 @@
                                          object_after_tag=object_after_tag,\n
                                          object_priority=higher_priority,\n
                                          sql_catalog_id=sql_catalog_id,\n
-                                         passive_commit=passive_commit)\n
+                                         passive_commit=passive_commit,)\n
 \n
 # We index templates secondly\n
 print "#### Indexing templates ####"\n
@@ -180,7 +183,7 @@
                                            object_after_tag=object_after_tag,\n
                                            object_priority=object_priority,\n
                                            sql_catalog_id=sql_catalog_id,\n
-                                           passive_commit=passive_commit)\n
+                                           passive_commit=passive_commit,)\n
 \n
 # Then we index everything except inventories\n
 for folder in portal.objectValues(("ERP5 Folder",)):\n
@@ -196,7 +199,9 @@
                                      object_after_tag=object_after_tag,\n
                                      object_priority=object_priority,\n
                                      sql_catalog_id=sql_catalog_id,\n
-                                     passive_commit=passive_commit)\n
+                                     passive_commit=passive_commit,\n
+                                     start_tree=start_tree,\n
+                                     stop_tree=stop_tree,)\n
 \n
 # Then we index inventories\n
 object_tag = \'inventory\'\n
@@ -214,7 +219,9 @@
                                      object_after_tag=object_after_tag,\n
                                      object_priority=object_priority,\n
                                      sql_catalog_id=sql_catalog_id,\n
-                                     passive_commit=passive_commit)\n
+                                     passive_commit=passive_commit,\n
+                                     start_tree=start_tree,\n
+                                     stop_tree=stop_tree,)\n
 \n
 # start activty from simulation because the erp5site is not an active object\n
 context.portal_simulation.activate(\n
@@ -261,7 +268,7 @@
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>sql_catalog_id=None, additional_priority=0, passive_commit=1, clear_catalog=0, final_activity_tag=None</string> </value>
+            <value> <string>sql_catalog_id=None, additional_priority=0, passive_commit=1, clear_catalog=0, final_activity_tag=None, start_tree=None, stop_tree=None</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -281,7 +288,7 @@
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>5</int> </value>
+                        <value> <int>7</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
@@ -292,6 +299,8 @@
                             <string>passive_commit</string>
                             <string>clear_catalog</string>
                             <string>final_activity_tag</string>
+                            <string>start_tree</string>
+                            <string>stop_tree</string>
                             <string>_print_</string>
                             <string>_print</string>
                             <string>_getattr_</string>
@@ -327,6 +336,8 @@
                 <int>1</int>
                 <int>0</int>
                 <none/>
+                <none/>
+                <none/>
               </tuple>
             </value>
         </item>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_reindexAll.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_reindexAll.xml?rev=17559&r1=17558&r2=17559&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_reindexAll.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_reindexAll.xml Tue Nov 13 17:41:58 2007
@@ -122,11 +122,29 @@
   id_list_list = []\n
   for bundle_index in xrange(len(id_list) / BUNDLE_ITEM_COUNT):\n
     id_list_list.append(id_list[bundle_index * BUNDLE_ITEM_COUNT:((bundle_index + 1) * BUNDLE_ITEM_COUNT)])\n
+\n
   remaining_object_id_count = len(id_list) % BUNDLE_ITEM_COUNT\n
   if remaining_object_id_count > 0:\n
     id_list_list.append(id_list[-remaining_object_id_count:])\n
   Folder_reindexObjectList(id_list_list)\n
-else:\n
+else:  \n
+  if start_tree is not None:\n
+    new_tree_id_list = []  \n
+    for tree_id in tree_id_list:\n
+      if tree_id >= start_tree:\n
+        new_tree_id_list.append(tree_id)\n
+    tree_id_list = new_tree_id_list\n
+    \n
+  if stop_tree is not None:\n
+    new_tree_id_list = []  \n
+    for tree_id in tree_id_list:\n
+      if tree_id < stop_tree:\n
+        new_tree_id_list.append(tree_id)\n
+    tree_id_list = new_tree_id_list\n
+\n
+  if len(tree_id_list) == 0:\n
+    return\n
+        \n
   i = 0\n
 \n
   tree_tag = "%s_tree" % folder_id\n
@@ -183,7 +201,7 @@
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>folder_tag=None, folder_after_tag=None, object_tag=None, object_after_tag=None, object_priority=1, sql_catalog_id=None, passive_commit=1</string> </value>
+            <value> <string>folder_tag=None, folder_after_tag=None, object_tag=None, object_after_tag=None, object_priority=1, sql_catalog_id=None, passive_commit=1, start_tree=None, stop_tree=None</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -203,7 +221,7 @@
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>7</int> </value>
+                        <value> <int>9</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
@@ -216,6 +234,8 @@
                             <string>object_priority</string>
                             <string>sql_catalog_id</string>
                             <string>passive_commit</string>
+                            <string>start_tree</string>
+                            <string>stop_tree</string>
                             <string>context</string>
                             <string>folder</string>
                             <string>activate_kw</string>
@@ -242,6 +262,8 @@
                             <string>bundle_index</string>
                             <string>_getitem_</string>
                             <string>remaining_object_id_count</string>
+                            <string>new_tree_id_list</string>
+                            <string>tree_id</string>
                             <string>i</string>
                             <string>tree_tag</string>
                             <string>tree_after_tag</string>
@@ -268,6 +290,8 @@
                 <int>1</int>
                 <none/>
                 <int>1</int>
+                <none/>
+                <none/>
               </tuple>
             </value>
         </item>




More information about the Erp5-report mailing list