* [PATCH] toaster: include setscene in task progress
@ 2017-07-01 2:19 David Reyna
0 siblings, 0 replies; only message in thread
From: David Reyna @ 2017-07-01 2:19 UTC (permalink / raw)
To: toaster
From: David Reyna <David.Reyna@windriver.com>
Change the task progress counting from the task order field
which excludes setscene to the task completion field which
counts all completed tasks regardless of type.
[YOCTO #9971]
Signed-off-by: David Reyna <David.Reyna@windriver.com>
---
bitbake/lib/toaster/orm/models.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 630e4a0..e9182c5 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -508,7 +508,7 @@ class Build(models.Model):
tf = Task.objects.filter(build = self)
tfc = tf.count()
if tfc > 0:
- completeper = tf.exclude(order__isnull=True).count()*100 // tfc
+ completeper = tf.exclude(outcome=Task.OUTCOME_NA).count()*100 // tfc
else:
completeper = 0
return completeper
@@ -709,10 +709,11 @@ class Build(models.Model):
tasks.
Note that the mechanism for testing whether a Task is "done" is whether
- its order field is set, as per the completeper() method.
+ its outcome field is set, as per the completeper() method.
"""
return self.outcome == Build.IN_PROGRESS and \
- self.task_build.filter(order__isnull=False).count() == 0
+ self.task_build.exclude(outcome=Task.OUTCOME_NA).count() == 0
+
def get_state(self):
"""
--
1.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-01 2:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-01 2:19 [PATCH] toaster: include setscene in task progress David Reyna
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.