Revert previous commit. Renamed wrong alias

This commit is contained in:
balandi1 2019-11-21 14:12:53 -05:00
parent 9952b9861d
commit 270c8669e6
24 changed files with 229 additions and 229 deletions

View file

@ -21,7 +21,7 @@ package offerUtils
import (
"fmt"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
elekLog "github.com/sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/spdfg/elektron/constants"
"github.com/spdfg/elektron/elektronLogging"
elekLogTypes "github.com/spdfg/elektron/elektronLogging/types"
@ -90,14 +90,14 @@ func UpdateEnvironment(offer *mesos.Offer) {
var host = offer.GetHostname()
// If this host is not present in the set of hosts.
if _, ok := constants.Hosts[host]; !ok {
elektronLogging.ElektronLog.Log(elekLogTypes.GENERAL, elekLog.InfoLevel,
elekLog.Fields{"Adding host": fmt.Sprintf("%s", host)}, "New host detected")
elektronLogging.ElektronLog.Log(elekLogTypes.GENERAL, log.InfoLevel,
log.Fields{"Adding host": fmt.Sprintf("%s", host)}, "New host detected")
// Add this host.
constants.Hosts[host] = struct{}{}
// Get the power class of this host.
class := PowerClass(offer)
elektronLogging.ElektronLog.Log(elekLogTypes.GENERAL, elekLog.InfoLevel,
elekLog.Fields{"host": fmt.Sprintf("%s", host), "PowerClass": fmt.Sprintf("%s", class)}, "Registering the power class...")
elektronLogging.ElektronLog.Log(elekLogTypes.GENERAL, log.InfoLevel,
log.Fields{"host": fmt.Sprintf("%s", host), "PowerClass": fmt.Sprintf("%s", class)}, "Registering the power class...")
// If new power class, register the power class.
if _, ok := constants.PowerClasses[class]; !ok {
constants.PowerClasses[class] = make(map[string]struct{})