Skip to content

Commit

Permalink
bidengine: correct max price
Browse files Browse the repository at this point in the history
fixes #318
  • Loading branch information
boz committed Jul 30, 2018
1 parent 6aa9641 commit 24e1f3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions provider/bidengine/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func (o *order) shouldBid(group *types.DeploymentGroup) bool {
cpu += int64(rg.Unit.CPU * rg.Count)
mem += int64(rg.Unit.Memory * uint64(rg.Count))
disk += int64(rg.Unit.Disk * uint64(rg.Count))
price += int64(rg.Price)
price += int64(rg.Price * uint64(rg.Count))
}

// requesting too much cpu?
Expand Down Expand Up @@ -296,7 +296,7 @@ func (o *order) calculatePrice(resources types.ResourceList) uint64 {
)

for _, group := range resources.GetResources() {
rmax += int64(group.Price)
rmax += int64(group.Price * uint64(group.Count))
mem += int64(group.Unit.Memory * uint64(group.Count))
}

Expand Down

0 comments on commit 24e1f3c

Please sign in to comment.