zhangmeng
2019-12-23 ea5e8e0577d5c86c624e0f43bfc7f5874e8b719b
main.go
@@ -3,7 +3,9 @@
import (
   "analysis/logo"
   "analysis/util"
   "os/signal"
   "strconv"
   "syscall"
   "analysis/app/master"
   "analysis/app/slave"
@@ -28,8 +30,6 @@
   ruleIPC string
   configPath string
   showConsole bool
)
const (
@@ -48,8 +48,6 @@
   flag.BoolVar(&shm, util.SHM, false, "use shm for performance")
   flag.IntVar(&gpu, util.GPU, -1, "gpu index")
   flag.BoolVar(&showConsole, "log-console", false, "log show console, only for debug")
   // 指定获取配置信息从sqlite,有最高优先级, master使用
   flag.StringVar(&util.FSI.IP, util.FetchSrvIP, util.FSI.IP, "fetch server ip, like camera info")
@@ -70,9 +68,7 @@
      logo.Config(file, 500, 3, 30)
      logo.Infoln("START LOGGER FILE: ", file)
   }
   if showConsole {
      logo.ShowConsole()
   }
   logo.ShowConsole()
}
func setParamters() {
@@ -127,10 +123,9 @@
   }
   if ret {
      // c := make(chan os.Signal, 1)
      // signal.Notify(c, os.Interrupt, os.Kill, unix.SIGTERM)
      // <-c
      select {}
      c := make(chan os.Signal, 1)
      signal.Notify(c, os.Interrupt, os.Kill, syscall.SIGTERM)
      <-c
   }
   cancel()