package pkg import ( commonConfig "cicv-data-closedloop/aarch64/pjibot_guide/common/config" "cicv-data-closedloop/common/config/c_log" "time" ) // UN_CHANGE 没有新的任务 // CHANGE 有新的任务 // NONE 设备没有配置任务 func GetCloudStatus(status *string, turnLength int) { // 轮询云端任务状态 for { time.Sleep(time.Duration(turnLength) * time.Second) taskStatus, err := commonConfig.GetStatus(commonConfig.PlatformConfig.TaskConfigId) if err != nil { c_log.GlobalLogger.Error("获取云端配置status失败:", err) continue } *status = taskStatus } }