|
@@ -113,6 +113,12 @@ func main() {
|
|
// 更新云端任务状态
|
|
// 更新云端任务状态
|
|
go pkg.GetCloudStatus(&cloudStatus, &lastCloudStatus, cloudTurnLength)
|
|
go pkg.GetCloudStatus(&cloudStatus, &lastCloudStatus, cloudTurnLength)
|
|
|
|
|
|
|
|
+ // 定期检查本地任务状态,执行续约,避免短时间内多次启停
|
|
|
|
+ go renew()
|
|
|
|
+
|
|
|
|
+ // 云端任务状态负责更新配置
|
|
|
|
+ go pkg.GetCloudConfig(cloudStatus, lastCloudStatus, cloudTurnLength)
|
|
|
|
+
|
|
for {
|
|
for {
|
|
if launchedFlag { // 当前已启动master节点
|
|
if launchedFlag { // 当前已启动master节点
|
|
time.Sleep(time.Duration(cloudTurnLength) * time.Second)
|
|
time.Sleep(time.Duration(cloudTurnLength) * time.Second)
|
|
@@ -151,13 +157,6 @@ func main() {
|
|
} else {
|
|
} else {
|
|
c_log.GlobalLogger.Error("未知的设备运行状态。【status】=", localStatus)
|
|
c_log.GlobalLogger.Error("未知的设备运行状态。【status】=", localStatus)
|
|
}
|
|
}
|
|
-
|
|
|
|
- // 定期检查本地任务状态,执行续约,避免短时间内多次启停
|
|
|
|
- go renew()
|
|
|
|
-
|
|
|
|
- // 云端任务状态负责更新配置
|
|
|
|
- go pkg.GetCloudConfig(cloudStatus, lastCloudStatus, cloudTurnLength)
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|