Commit 4dfcd619 authored by Romain Courteaud's avatar Romain Courteaud

erp5_full_text_mroonga_catalog: propagate the indexation tag

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