summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-06-11 15:33:17 +0100
committerAlexandru DAMIAN <alexandru.damian@intel.com>2014-06-20 14:46:36 +0100
commit5d85d1a7bbbce2c9baaa613c5cc84c511fb88376 (patch)
treea4c656dc8b3ffa2777babc496518d0b8670fcfd4
parente068727de686cd6c43cebacdac5b898c134705ef (diff)
downloadbitbake-5d85d1a7bbbce2c9baaa613c5cc84c511fb88376.tar.gz
toastergui: fix built ETA calculation
We fix the calculation showing the estimated time to build completion. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
-rwxr-xr-xlib/toaster/toastergui/views.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index 686cd5c8c..b38d260d6 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -230,11 +230,10 @@ def builds(request):
b.completeper = tf.exclude(order__isnull=True).count()*100/tf.count()
else:
b.completeper = 0
- b.eta = timezone.now()
+
+ b.eta = 0
if b.completeper > 0:
- b.eta += ((timezone.now() - b.started_on)*100/b.completeper)
- else:
- b.eta = 0
+ b.eta = timezone.now() + ((timezone.now() - b.started_on)*(100-b.completeper)/b.completeper)
# set up list of fstypes for each build
fstypes_map = {};