Commit 00ad4a75 authored by David Douard's avatar David Douard
Browse files

[entities] make ICeleryTask.progress return an aggregated progress value

including all the children subtasks' progress values
parent 5c4777ebe180
......@@ -179,6 +179,10 @@ class ICeleryTask(EntityAdapter):
result = self.result
if and 'progress' in
elif self.entity.reverse_parent_task:
children = self.entity.reverse_parent_task
return sum(child.cw_adapt_to('ICeleryTask').progress
for child in children) / len(children)
elif result.state == STATES.SUCCESS:
return 1.
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