log
panlei
2019-11-29 3edc30421c52011b2dfe25e5fbc43a428faa6977
main.go
@@ -16,7 +16,7 @@
   "flag"
   "fmt"
   "github.com/spf13/viper"
   //log "github.com/jeanphorn/log4go"
   log "github.com/jeanphorn/log4go"
   "ruleprocess/cache"
   "ruleprocess/ruleserver"
   "sync"
@@ -63,6 +63,8 @@
   labelFilter.Init()
   go ruleserver.TimeTicker()
   go ruleserver.StartServer()
   //timeEle := ruleserver.TimeElement{N: 300, InitN: 300}
   //ruleserver.TimeEleList["ruleprocess"] = &timeEle
   nReciever("ipc:///tmp/sdk-2-rules-process.ipc", deliver.PushPull, 1)
   wg.Wait()
}
@@ -91,7 +93,7 @@
            //go func(msg []byte) {
               logger.Debug("当前时间戳:", time.Now().Unix())
               //log.Warn(time.Now().Format("2006-01-02 15:04:05"))
               log.Warn(time.Now().Format("2006-01-02 15:04:05"))
               arg := structure.SdkDatas{}
               //paramFormat(msg, &arg)
               start := time.Now()
@@ -116,7 +118,7 @@
}
func CallParamFormat(msg []byte, args *structure.SdkDatas) protomsg.SdkMessage{
   logger.Info("呼叫中间件格式化数据")
   log.Info("呼叫中间件格式化数据")
   p,err :=  plugin.Open("./algorithm/middleware.so")
   if err != nil {
      panic(err)
@@ -128,3 +130,5 @@
   mess := f.(func(msg []byte, args *structure.SdkDatas)(protomsg.SdkMessage))(msg,args)
   return mess
}
// 5分钟收不到消息杀死自己重启