Skip to content

Commit

Permalink
Fix linting and better comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Preetha Appan committed Sep 27, 2018
1 parent 517f4ab commit c395008
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scheduler/preemption.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ func preemptForNetworkResourceAsk(jobPriority int, currentAllocs []*structs.Allo

// If bandwidth requirements have been met, stop
if preemptedBandwidth+freeBandwidth >= MbitsNeeded {
met = true
break
}

Expand Down Expand Up @@ -407,10 +406,12 @@ func preemptForNetworkResourceAsk(jobPriority int, currentAllocs []*structs.Allo
break
}
}
// If we met bandwidth needs we can break out of loop that's iterating by priority within a device
if met {
break
}
}
// If we met bandwidth needs we can break out of loop that's iterating by allocs sharing the same network device
if met {
break
}
Expand Down

0 comments on commit c395008

Please sign in to comment.