Commit ebbeb9e1 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: no need to use a tag if context is not reindexed

parent 02aa9604
......@@ -4,8 +4,9 @@ alarm_tool = portal.portal_alarms
if alarm_tool.isSubscribed() and len(alarm_id_list):
# No alarm tool is not subscribed, respect this choice and do not activate any alarm
tag = "%s-%s" % (script.id, context.getRelativeUrl())
tag = None
if must_reindex_context:
tag = "%s-%s" % (script.id, context.getRelativeUrl())
context.reindexObject(activate_kw={'tag': tag})
for alarm_id in alarm_id_list:
......@@ -15,7 +16,7 @@ if alarm_tool.isSubscribed() and len(alarm_id_list):
if alarm.isActive():
# Wait for the previous alarm run to be finished
context.activate(after_path=alarm.getPath()).Base_reindexAndSenseAlarm([alarm_id], must_reindex_context=False)
context.activate(after_path=alarm.getPath(), after_tag=tag).Base_reindexAndSenseAlarm([alarm_id], must_reindex_context=False)
else:
# wait for the context to be reindexed before activating the alarm
# ROMAIN: SQLQueue is used, because I'm not sure if SQLDict drop activities with different after_tag
......
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