fix
zhangqian
2023-10-30 10c65da3d2af7056f48d9301e83f53f102f76e18
main.go
@@ -11,6 +11,7 @@
   "apsClient/serf"
   "apsClient/service/plc_address"
   "fmt"
   "log"
   "net/http"
   "time"
)
@@ -38,6 +39,8 @@
      "production_progress",
      "work_order",
      "task_status_sync",
      "device",
      "device_plc",
   }
   agent := serf.InitAgent("apsClient", syncTables, sqlitex.GetDB())
@@ -50,6 +53,8 @@
   }
   // 判断当前集群状态
   logx.Infof("current agent.ClusterStatus:%v", agent.ClusterStatus)
   log.Println("current agent.ClusterStatus:", agent.ClusterStatus)
   if agent.ClusterStatus != "slave" {
      if err := nsq.Init(); err != nil {
         logx.Errorf("nsq Init err:%v", err)