fix: correct issue where resource setting was overriding pre-existing values

This commit is contained in:
Jose Diaz-Gonzalez
2019-05-17 11:58:53 -04:00
parent c786b9e45e
commit ceac86b58f
2 changed files with 8 additions and 2 deletions

View File

@@ -121,10 +121,11 @@ func setResourceType(appName string, processType string, r Resource, resourceTyp
common.LogInfo2Quiet(message)
for key, value := range resources {
if value != "" {
common.LogVerbose(fmt.Sprintf("%v: %v", key, value))
if value == "" {
continue
}
common.LogVerbose(fmt.Sprintf("%v: %v", key, value))
property := propertyKey(processType, resourceType, key)
err := common.PropertyWrite("resource", appName, property, value)
if err != nil {