| | |
| | | } |
| | | |
| | | now := time.Now() |
| | | filename := fmt.Sprintf("%s_%04d%02d%02d_%02d%02d", |
| | | me.fileName, now.Year(), now.Month(), now.Day(), now.Hour(), now.Minute()) |
| | | filename := fmt.Sprintf("%s_%04d%02d%02d", |
| | | me.fileName, now.Year(), now.Month(), now.Day()) |
| | | if err := os.Rename(me.fileName, filename); err == nil { |
| | | go func() { |
| | | tarCmd := exec.Command("tar", "-zcf", filename+".tar.gz", filename, "--remove-files") |
| | |
| | | dbapi.Init(*dbIp,*dbPort) |
| | | go cache.Init(initchan,*dbIp,*surveyPort,*pubPort) |
| | | logger.Info("cache init completed!!!",<- initchan)//dbserver初始化完毕 |
| | | fmt.Println("缓存初始化完成",<- initchan)//dbserver初始化完毕 |
| | | |
| | | go ruleserver.TimeTicker() |
| | | nReciever("ipc:///tmp/sdk-2-rules-process.ipc", deliver.PushPull, 1) |