@@ -41,7 +41,7 @@ var (
SubscribeTopics []string
)
-// InitPlatformConfig 初始化数据闭环平台的配置
+// 初始化数据闭环平台的配置
func InitPlatformConfig() {
var err error
c_log.GlobalLogger.Info("获取数据闭环平台配置 - 开始")
@@ -26,9 +26,13 @@ func init() {
func main() {
lastStatus := "NONE"
+ wait := false
// 轮询任务接口判断是否有更新
for {
- time.Sleep(time.Duration(60) * time.Second)
+ if wait { // 第一次就不等待一分钟了
+ time.Sleep(time.Duration(60) * time.Second)
+ }
+ wait = true
// 1 获取当前设备的任务的 status
status, err := config.GetStatus(config.PlatformConfig.TaskConfigId)
if err != nil {
@@ -1,7 +1,7 @@
package main
import (
- "cicv-data-closedloop/pji_msgs"
+ "cicv-data-closedloop/pjibot_patrol_msgs"
func Topic() string {