Commit 685bbdf0 authored by Romain Courteaud's avatar Romain Courteaud

erp5_full_text_mroonga_catalog: propagate the indexation tag

parent cdc9ff02
...@@ -3,13 +3,16 @@ METHOD_ID = script.id + 'Activity' ...@@ -3,13 +3,16 @@ METHOD_ID = script.id + 'Activity'
GROUP_METHOD_ID = context.getPath() + '/' + METHOD_ID GROUP_METHOD_ID = context.getPath() + '/' + METHOD_ID
activateObject = context.getPortalObject().portal_activities.activateObject activateObject = context.getPortalObject().portal_activities.activateObject
try: try:
priority = context.getActivityRuntimeEnvironment().getPriority() activity_runtime_environment = context.getActivityRuntimeEnvironment()
priority = activity_runtime_environment.getPriority()
tag = activity_runtime_environment.getTag()
except KeyError: except KeyError:
# called outside of an activity, could be an immediate reindexation # called outside of an activity, could be an immediate reindexation
# XXX: duplicates default priority for sake of simplicity and speed. # XXX: duplicates default priority for sake of simplicity and speed.
# Strictly, this could also look-up default activate parameters, but on # Strictly, this could also look-up default activate parameters, but on
# which document ? Traversing is expensive. So keep things fast by default. # which document ? Traversing is expensive. So keep things fast by default.
priority = 1 priority = 1
tag = None
# Optimise cache usage by reducing the likelyhood of a processing node # Optimise cache usage by reducing the likelyhood of a processing node
# including activities spawned by others into its activity group. # including activities spawned by others into its activity group.
# But prevent the group from going below 10 activities, for better throughput. # But prevent the group from going below 10 activities, for better throughput.
...@@ -20,6 +23,7 @@ for document in getPath: ...@@ -20,6 +23,7 @@ for document in getPath:
document, document,
activity='SQLDict', activity='SQLDict',
priority=priority, priority=priority,
tag=tag,
node='same', node='same',
group_method_id=GROUP_METHOD_ID, group_method_id=GROUP_METHOD_ID,
group_method_cost=group_method_cost, group_method_cost=group_method_cost,
......
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