From eb2c3a8890a0e9695c0cd2bc3b3dc310c6fbcfa9 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期六, 26 十月 2019 11:28:23 +0800
Subject: [PATCH] fix user timeout

---
 main.go |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/main.go b/main.go
index 21f6665..425e46d 100644
--- a/main.go
+++ b/main.go
@@ -1,14 +1,16 @@
 package main
 
 import (
-	"basic.com/dbapi.git"
-	"basic.com/valib/logger.git"
 	"flag"
-	"github.com/spf13/viper"
 	"strconv"
 	"webserver/cache"
 	"webserver/extend/config"
+	"webserver/extend/sys"
 	"webserver/router"
+
+	"basic.com/dbapi.git"
+	"basic.com/valib/logger.git"
+	"github.com/spf13/viper"
 )
 
 var envirment = flag.String("e", "dev", "")
@@ -40,7 +42,7 @@
 		viper.GetInt("LogLevel") >= logger.PanicLevel &&
 		viper.GetInt("LogLevel") <= logger.DebugLevel {
 		logger.Config(logFile, viper.GetInt("LogLevel"))
-	}else{
+	} else {
 		logger.Config(logFile, logger.DebugLevel)
 	}
 	logger.SetSaveDays(logSaveDays)
@@ -56,8 +58,11 @@
 // @BasePath /
 func main() {
 	flag.Parse()
-	go cache.Init(initchan, *dbIp, *surveyPort,*pubPort)
-	logger.Debug("heartBeat with db done!",<-initchan)
+	go cache.Init(initchan, *dbIp, *surveyPort, *pubPort)
+	logger.Debug("heartBeat with db done!", <-initchan)
+
+	// 缁熻绯荤粺杩愯鐘舵��
+	go sys.GatherStat()
 
 	r := router.NewRouter()
 	r.Run("0.0.0.0:8000")

--
Gitblit v1.8.0