main.go
@@ -43,6 +43,7 @@ "task_status_sync", "device", "device_plc", "system_status", } agent := serf.InitAgent("apsClient", syncTables, sqlitex.GetDB()) @@ -54,10 +55,11 @@ return } //从文件里读取当前生产设备id conf.Conf.CurrentDeviceID = service.ReadDeviceIDFromFile() if conf.Conf.CurrentDeviceID == "" { conf.Conf.CurrentDeviceID = conf.Conf.System.DeviceId //从文件里读取当前生产设备id获取设备列表第一个 err := service.InitCurrentDeviceID() if err != nil { logx.Errorf("InitCurrentDeviceID error: %v, exit", err) return } // 判断当前集群状态