Minor renaming of receivers in some schedulers
This commit is contained in:
parent
bf9a5a6005
commit
fa0cd43a5e
2 changed files with 4 additions and 4 deletions
|
@ -13,13 +13,13 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// Decides if to take an offer or not
|
// 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)
|
cpus, mem, watts := OfferAgg(offer)
|
||||||
|
|
||||||
//TODO: Insert watts calculation here instead of taking them as a parameter
|
//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
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,13 +14,13 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// Decides if to take an offer or not
|
// 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)
|
cpus, mem, watts := OfferAgg(offer)
|
||||||
|
|
||||||
//TODO: Insert watts calculation here instead of taking them as a parameter
|
//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
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue