[VOL-1667] Fix instance Id and other minor fixes
This commit fixes the following:
1) Remove the instance ID as an input parameter and let the code
sets it to hostname
2) Removes logs settings in the rw_core that were overwriting the
input parameter setting
3) Removes unnecessary device loading at creation time (applies to
the core in a core-pair that is only monitoring the transaction).
The device ID is not know by that Core at that time.
4) Some minor cleanups
Change-Id: If781103bfb449dcae5421284456c4b0fe67704fd
diff --git a/rw_core/utils/core_utils.go b/rw_core/utils/core_utils.go
index 813c978..c9cd56d 100644
--- a/rw_core/utils/core_utils.go
+++ b/rw_core/utils/core_utils.go
@@ -18,6 +18,7 @@
import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
+ "os"
"reflect"
"time"
)
@@ -30,6 +31,10 @@
Id string
}
+func GetHostName() string {
+ return os.Getenv("HOSTNAME")
+}
+
//WaitForNilOrErrorResponses waits on a variadic number of channels for either a nil response or an error
//response. If an error is received from a given channel then the returned error array will contain that error.
//The error will be at the index corresponding to the order in which the channel appear in the parameter list.