Commit dd69a61c authored by Jérome Perrin's avatar Jérome Perrin

disable alarms while reindexing all site

parent c3d1133d
......@@ -58,6 +58,12 @@ if clear_catalog:\n
catalog = portal.portal_catalog.getSQLCatalog(sql_catalog_id)\n
catalog.manage_catalogClear()\n
\n
# disable alarms while we are reindexing\n
if clear_catalog:\n
alarm_node = portal.portal_alarms.getAlarmNode()\n
if alarm_node:\n
portal.portal_alarms.setAlarmNode(None)\n
\n
# Reindex person module\n
print "#### Indexing person_module, stage 1 ####"\n
person_module=getattr(portal, \'person_module\', None)\n
......@@ -233,6 +239,11 @@ context.portal_simulation.activate(\n
sql_catalog_id=sql_catalog_id,\n
final_activity_tag=\'last_inventory_activity\')\n
\n
# restore alarm node \n
if clear_catalog and alarm_node:\n
portal.portal_alarms.activate(after_tag=(\'inventory\', \'module\', \'inventory\', \'simulation\', \'person_stage_1\',\n
\'group_person_stage_1\', \'last_inventory_activity\', \'document\')).setAlarmNode(alarm_node)\n
\n
if final_activity_tag is not None:\n
# Start a dummy activity which will get discarded when all started activities\n
# (and all activities they trigger) are over.\n
......
41084
\ No newline at end of file
41086
\ 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