panlei
2019-09-10 1e3773f6d294591ce67141165e552a3e0f7d6bd1
main.go
@@ -4,6 +4,8 @@
   "basic.com/dbapi.git"
   "basic.com/pubsub/protomsg.git"
   "basic.com/valib/deliver.git"
   "net/http"
   _ "net/http/pprof"
   "ruleprocess/insertdata"
   "ruleprocess/util"
   "time"
@@ -36,14 +38,17 @@
}
func main() {
   //fmt.Println("缓存初始化完成",<- initchan)//dbserver初始化完毕
   go func() {
      http.ListenAndServe("0.0.0.0:8899",nil)
   }()
   flag.Parse()
   wg := sync.WaitGroup{}
   wg.Add(2)
   wg.Add(3)
   dbapi.Init(*dbIp, *dbPort)
   go cache.Init(initchan, *dbIp, *surveyPort, *pubPort)
   logger.Info("cache init completed!!!", <-initchan) //dbserver初始化完毕
   //fmt.Println("缓存初始化完成",<- initchan)//dbserver初始化完毕
   ruleserver.Init()
   go ruleserver.TimeTicker()
   go ruleserver.StartServer()