bitbake: toastergui: fix built ETA calculation
We fix the calculation showing the estimated time to build completion. (Bitbake rev: dc1daae51ef5201475b5c1a69d966ae57b66dcb6) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
74cd8c38aa
commit
87b99274e9
|
@ -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 = {};
|
||||
|
|
Loading…
Reference in New Issue