From: Alexandru DAMIAN <[email protected]> We fix the calculation showing the estimated time to build completion.
Signed-off-by: Alexandru DAMIAN <[email protected]> --- lib/toaster/toastergui/views.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py index 686cd5c..b38d260 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 = {}; -- 1.9.1 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
