summaryrefslogtreecommitdiffstats
path: root/lib/toaster
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-12 14:38:28 +0100
commitdc1daae51ef5201475b5c1a69d966ae57b66dcb6 (patch)
tree84713f8c50f406cd941ebfec8367ffbee3f6a0f5 /lib/toaster
parentdb5390940c0afbcdc9fbcf1225761968ae51d4a7 (diff)
downloadbitbake-contrib-dc1daae51ef5201475b5c1a69d966ae57b66dcb6.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>
Diffstat (limited to 'lib/toaster')
-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 = {};