Просмотр исходного кода

make it more clear that we're using the lb.Minutes

Signed-off-by: Matt Bolt <mbolt35@gmail.com>
Matt Bolt 1 год назад
Родитель
Сommit
723d62656f
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      pkg/costmodel/cluster.go

+ 2 - 2
pkg/costmodel/cluster.go

@@ -718,8 +718,8 @@ func ClusterLoadBalancers(dataSource source.OpenCostDataSource, start, end time.
 			lb.End = active.end
 			lb.Minutes = active.minutes
 
-			if active.minutes > 0 {
-				lb.Cost = lbPricePerHr * (active.minutes / 60.0)
+			if lb.Minutes > 0 {
+				lb.Cost = lbPricePerHr * (lb.Minutes / 60.0)
 			} else {
 				log.DedupedWarningf(20, "ClusterLoadBalancers: found zero minutes for key: %v", key)
 			}