Minor renaming of receivers in some schedulers

This commit is contained in:
Renan DelValle 2016-10-18 17:39:44 -04:00
parent cf3d83e712
commit 7c7d80b557
2 changed files with 4 additions and 4 deletions

View file

@ -13,13 +13,13 @@ import (
)
// Decides if to take an offer or not
func (*FirstFit) takeOffer(offer *mesos.Offer, task def.Task) bool {
func (s *FirstFit) takeOffer(offer *mesos.Offer, task def.Task) bool {
cpus, mem, watts := OfferAgg(offer)
//TODO: Insert watts calculation here instead of taking them as a parameter
if cpus >= task.CPU && mem >= task.RAM && watts >= task.Watts {
if cpus >= task.CPU && mem >= task.RAM && (s.ignoreWatts || watts >= task.Watts) {
return true
}

View file

@ -14,13 +14,13 @@ import (
)
// Decides if to take an offer or not
func (*FirstFitSortedWatts) takeOffer(offer *mesos.Offer, task def.Task) bool {
func (s *FirstFitSortedWatts) takeOffer(offer *mesos.Offer, task def.Task) bool {
cpus, mem, watts := OfferAgg(offer)
//TODO: Insert watts calculation here instead of taking them as a parameter
if cpus >= task.CPU && mem >= task.RAM && watts >= task.Watts {
if cpus >= task.CPU && mem >= task.RAM && (s.ignoreWatts || watts >= task.Watts) {
return true
}