|
@@ -102,6 +102,7 @@ func stopMasterNode() {
|
|
|
func main() {
|
|
|
localTurnLength := 2 // s
|
|
|
cloudTurnLength := 60 // s
|
|
|
+ waitStopLength := 2 // min
|
|
|
|
|
|
// 更新本地任务状态
|
|
|
go pkg.GetLocalStatus(&localStatus, &lastLocalStatus, localTurnLength)
|
|
@@ -142,6 +143,7 @@ func main() {
|
|
|
} else if localStatus == "idle" {
|
|
|
if !renewedFlag && launchedFlag && len(entity.TimeWindowConsumerQueue) == 0 {
|
|
|
c_log.GlobalLogger.Info("设备不在运行状态且没有待处理的数据,数采程序关闭 - 开始。")
|
|
|
+ time.Sleep(time.Duration(waitStopLength) * time.Minute)
|
|
|
stopMasterNode()
|
|
|
}
|
|
|
continue
|