Code Refactoring
Modified comments. Organized imports.
This commit is contained in:
parent
2fa3bebaa6
commit
0c0361e209
24 changed files with 114 additions and 105 deletions
|
@ -90,13 +90,13 @@ 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 {
|
||||
elekLog.ElektronLog.Log(elekLogTypes.CONSOLE, log.InfoLevel,
|
||||
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel,
|
||||
log.Fields{"Adding host": host}, "New host detected")
|
||||
// Add this host.
|
||||
constants.Hosts[host] = struct{}{}
|
||||
// Get the power class of this host.
|
||||
class := PowerClass(offer)
|
||||
elekLog.ElektronLog.Log(elekLogTypes.CONSOLE, log.InfoLevel,
|
||||
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel,
|
||||
log.Fields{"host": host, "PowerClass": class}, "Registering the power class...")
|
||||
// If new power class, register the power class.
|
||||
if _, ok := constants.PowerClasses[class]; !ok {
|
||||
|
|
Reference in a new issue