Commit 3ff4fd59 authored by Ivan Tyagov's avatar Ivan Tyagov

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).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37033 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 36f33797
......@@ -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>
......
1623
\ No newline at end of file
1624
\ No newline at end of file
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