|
@@ -21,6 +21,7 @@ var (
|
|
|
lastLocalStatus = "idle"
|
|
|
lastCloudStatus = "NONE"
|
|
|
launchedFlag = false
|
|
|
+ configuredFlag = false
|
|
|
)
|
|
|
|
|
|
func init() {
|
|
@@ -40,10 +41,11 @@ func init() {
|
|
|
}
|
|
|
|
|
|
func main() {
|
|
|
- localTurnLength := 2
|
|
|
- cloudTurnLength := 60
|
|
|
+ localTurnLength := 2
|
|
|
+ cloudTurnLength := 60
|
|
|
+ configTurnLength := 60
|
|
|
overallTurnLength := localTurnLength
|
|
|
- stopTimeWindow := 10
|
|
|
+ stopTime := 10
|
|
|
|
|
|
|
|
|
go pkg.GetLocalStatus(&localStatus, &lastLocalStatus, localTurnLength)
|
|
@@ -83,7 +85,7 @@ func main() {
|
|
|
if lastLocalStatus == "running" && localStatus == "idle" {
|
|
|
if launchedFlag {
|
|
|
|
|
|
- time.Sleep(time.Duration(stopTimeWindow) * time.Minute)
|
|
|
+ time.Sleep(time.Duration(stopTime) * time.Minute)
|
|
|
|
|
|
var killArgs commonService.KillSignal
|
|
|
killArgs = commonService.KillSignal{NodeName: "master", DropUploadData: commonConfig.PlatformConfig.DropUploadData, Restart: false}
|
|
@@ -115,10 +117,7 @@ func main() {
|
|
|
}
|
|
|
|
|
|
|
|
|
- if cloudStatus == "CHANGE" {
|
|
|
- commonConfig.InitPlatformConfig()
|
|
|
- continue
|
|
|
- }
|
|
|
+ go pkg.GetCloudConfig(cloudStatus, lastCloudStatus, configTurnLength)
|
|
|
|
|
|
|
|
|
|