Commit 40714c14 authored by Jérome Perrin's avatar Jérome Perrin

amendments to dd69a61c, unsubcribe / subscribe...

amendments to dd69a61c, unsubcribe / subscribe instead of changing alarm node
parent 818dd922
......@@ -59,10 +59,10 @@ if clear_catalog:\n
catalog.manage_catalogClear()\n
\n
# disable alarms while we are reindexing\n
is_subscribed = portal.portal_alarms.isSubscribed()\n
if clear_catalog:\n
alarm_node = portal.portal_alarms.getAlarmNode()\n
if alarm_node:\n
portal.portal_alarms.setAlarmNode(None)\n
if is_subscribed:\n
portal.portal_alarms.unsubscribe()\n
\n
# Reindex person module\n
print "#### Indexing person_module, stage 1 ####"\n
......@@ -240,9 +240,9 @@ context.portal_simulation.activate(\n
final_activity_tag=\'last_inventory_activity\')\n
\n
# restore alarm node \n
if clear_catalog and alarm_node:\n
if clear_catalog and is_subscribed:\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
\'group_person_stage_1\', \'last_inventory_activity\', \'document\')).subscribe()\n
\n
if final_activity_tag is not None:\n
# Start a dummy activity which will get discarded when all started activities\n
......
41086
\ No newline at end of file
41087
\ 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