summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/models.py
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-07-12 16:14:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-11 00:09:26 +0100
commit82d998d6c6378e4eb70b5712b339b6095ed7540a (patch)
tree8eab08477492849c9f4175e99e9e624f93319f67 /bitbake/lib/toaster/orm/models.py
parentdd99cf957da5836dc9b48d200f15a66f0bbce245 (diff)
downloadpoky-82d998d6c6378e4eb70b5712b339b6095ed7540a.tar.gz
bitbake: toaster: show "Tasks starting..." until the first task completes
To prevent showing a "0% of tasks complete" message for a long time, don't show the progress bar until the first task has finished. While waiting for that first task, show a message about tasks starting instead. [YOCTO #9631] (Bitbake rev: 5529bcd860d2932b967a064ae28690ac5a725342) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/orm/models.py')
-rw-r--r--bitbake/lib/toaster/orm/models.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 4641736add..cfa243c595 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -628,6 +628,17 @@ class Build(models.Model):
628 return self.outcome == Build.IN_PROGRESS and \ 628 return self.outcome == Build.IN_PROGRESS and \
629 self.recipes_parsed < self.recipes_to_parse 629 self.recipes_parsed < self.recipes_to_parse
630 630
631 def is_starting(self):
632 """
633 True if the build has no completed tasks yet and is still just starting
634 tasks.
635
636 Note that the mechanism for testing whether a Task is "done" is whether
637 its order field is set, as per the completeper() method.
638 """
639 return self.outcome == Build.IN_PROGRESS and \
640 self.task_build.filter(order__isnull=False).count() == 0
641
631 def get_state(self): 642 def get_state(self):
632 """ 643 """
633 Get the state of the build; one of 'Succeeded', 'Failed', 'In Progress', 644 Get the state of the build; one of 'Succeeded', 'Failed', 'In Progress',
@@ -643,6 +654,8 @@ class Build(models.Model):
643 return 'Queued' 654 return 'Queued'
644 elif self.is_parsing(): 655 elif self.is_parsing():
645 return 'Parsing' 656 return 'Parsing'
657 elif self.is_starting():
658 return 'Starting'
646 else: 659 else:
647 return self.get_outcome_text() 660 return self.get_outcome_text()
648 661