[Erp5-report] r37033 ivan - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateI...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jul 12 08:49:58 CEST 2010


Author: ivan
Date: Mon Jul 12 08:49:58 2010
New Revision: 37033

URL: http://svn.erp5.org?rev=37033&view=rev
Log:
Make sure preferences are indexed first and respective node's cache is cleared.
This is done so a fresh cache settings is to be generated (in some rare cases different parts of ERP5 code use old wrong (or empty) cache settings).
Still clearing cache is done only for running code ZEO node not cluster wide (to be implemented).

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

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=37033&r1=37032&r2=37033&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml [utf8] Mon Jul 12 08:49:58 2010
@@ -61,14 +61,33 @@ if clear_catalog:\n
   catalog = portal.portal_catalog.getSQLCatalog(sql_catalog_id)\n
   catalog.manage_catalogClear()\n
 \n
+print "#### Indexing preferences ####"\n
+tag = \'portal_preferences\'\n
+context.portal_preferences.activate(\n
+                    tag=tag,\n
+                    priority=additional_priority).Folder_reindexAll(\n
+                                         folder_tag=tag,\n
+                                         object_tag=tag,\n
+                                         object_priority=additional_priority,\n
+                                         sql_catalog_id=sql_catalog_id,\n
+                                         passive_commit=passive_commit,\n
+                                         start_tree=start_tree,\n
+                                         stop_tree=stop_tree,)\n
+# clear cache after reindexing preferences\n
+context.portal_caches.activate(tag=\'%s_clear_cache\' %tag,\n
+                               priority=additional_priority,\n
+                               after_tag=tag).clearAllCache()\n
+\n
 # Reindex person module\n
 print "#### Indexing person_module, stage 1 ####"\n
 person_module=getattr(portal, \'person_module\', None)\n
 higher_priority = 1 + additional_priority\n
 if person_module is not None :\n
   tag = \'person_stage_1\'\n
+  folder_after_tag = (\'portal_preferences\', \'portal_preferences_clear_cache\',)\n
   person_module.activate(tag=tag,\n
-                         priority=higher_priority).Folder_reindexAll(\n
+                         priority=higher_priority,\n
+                         after_tag=folder_after_tag).Folder_reindexAll(\n
                                          folder_tag=tag,\n
                                          object_tag=tag,\n
                                          object_priority=higher_priority,\n
@@ -101,14 +120,13 @@ context.portal_categories.activate(\n
                                          passive_commit=passive_commit,)\n
 \n
 print "#### Indexing alarms ####"\n
-print "#### Indexing preferences ####"\n
 print "#### Indexing active results ####"\n
 folder_tag = \'module\'\n
 folder_after_tag = (\'category\', \'person_stage_1\', \'group_person_stage_1\')\n
 object_tag = \'document\'\n
 object_after_tag = folder_after_tag\n
 object_priority = 2 + additional_priority\n
-for folder in [context.portal_alarms, context.portal_preferences, context.portal_activities]:\n
+for folder in [context.portal_alarms, context.portal_activities]:\n
   folder.activate(\n
                     tag=folder_tag,\n
                     priority=object_priority,\n
@@ -295,13 +313,13 @@ return printed\n
                             <string>context</string>
                             <string>portal</string>
                             <string>catalog</string>
+                            <string>tag</string>
                             <string>getattr</string>
                             <string>None</string>
                             <string>person_module</string>
                             <string>higher_priority</string>
-                            <string>tag</string>
-                            <string>folder_tag</string>
                             <string>folder_after_tag</string>
+                            <string>folder_tag</string>
                             <string>object_tag</string>
                             <string>object_after_tag</string>
                             <string>object_priority</string>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=37033&r1=37032&r2=37033&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Mon Jul 12 08:49:58 2010
@@ -1 +1 @@
-1623
\ No newline at end of file
+1624
\ No newline at end of file




More information about the Erp5-report mailing list