Commit 74b5a68e authored by Vincent Pelletier's avatar Vincent Pelletier

CMFActivity.ActiivityTool: Move getCurrentNodeFamilyIdSet call in try..finally block.

Even though it should not raise, a stale lock would be a serious issue.
parent 0554eae5
...@@ -1322,9 +1322,9 @@ class ActivityTool (BaseTool): ...@@ -1322,9 +1322,9 @@ class ActivityTool (BaseTool):
return activity.getPriority(self, processing_node, return activity.getPriority(self, processing_node,
node_family_id_set) node_family_id_set)
while is_running_lock.acquire(0): while is_running_lock.acquire(0):
# May have changed since previous iteration.
node_family_id_set = self.getCurrentNodeFamilyIdSet()
try: try:
# May have changed since previous iteration.
node_family_id_set = self.getCurrentNodeFamilyIdSet()
activity_list.sort(key=sort_key) # stable sort activity_list.sort(key=sort_key) # stable sort
for i, activity in enumerate(activity_list): for i, activity in enumerate(activity_list):
# Transaction processing is the responsability of the activity # Transaction processing is the responsability of the activity
......
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