Bug fix to start capping when the first task fits an offer.
This commit is contained in:
parent
2744bbe0f4
commit
f46cd32869
2 changed files with 12 additions and 0 deletions
|
@ -229,6 +229,12 @@ func (s *BPMaxMinPistonCapping) CheckFit(i int,
|
|||
(offerCPU >= (*totalCPU + task.CPU)) &&
|
||||
(offerRAM >= (*totalRAM + task.RAM)) {
|
||||
|
||||
// Start piston capping if haven't started yet
|
||||
if !s.isCapping {
|
||||
s.isCapping = true
|
||||
s.startCapping()
|
||||
}
|
||||
|
||||
*totalWatts += task.Watts
|
||||
*totalCPU += task.CPU
|
||||
*totalRAM += task.RAM
|
||||
|
|
Reference in a new issue