diff --git a/weather/apps/initialize.go b/weather/apps/initialize.go index 3a672ba..65256a3 100755 --- a/weather/apps/initialize.go +++ b/weather/apps/initialize.go @@ -98,13 +98,14 @@ func initSession() { } func initCron() { - c := cron.New() - spec := beego.AppConfig.String("syncFrequency") - c.AddFunc(spec, func() { - httpService := new(service.HttpService) - httpService.GetActivityTyhoon() - }) - c.Start() + //c := cron.New() + //spec := beego.AppConfig.String("syncFrequency") + //c.AddFunc(spec, func() { + // httpService := new(service.HttpService) + // httpService.GetActivityTyhoon() + //}) + //c.Start() + fmt.Println("storm initCron") } func initCronWeather() { diff --git a/weather/conf/app.conf b/weather/conf/app.conf index 3d09902..f37f2a6 100755 --- a/weather/conf/app.conf +++ b/weather/conf/app.conf @@ -16,18 +16,19 @@ httpport = 8084 #mysqlmaxConn = 300 SessionName = "beegosessionID" -syncFrequency = "0 */10 * * * *" +syncFrequency = "0 10 * * * *" syncFrequencyWeather = "0 16 * * * *" # syncFrequencyWeather = "0 9 * * * *" +# syncFrequency = "0 */10 * * * *" mysqluser = "root" mysqlpass = "Skyinno251," +#mysqlurls = "192.168.3.29:3306" mysqlurls = "127.0.0.1:3306" -mysqldb = "weather" +mysqldb = "disruptor_nmc" -# mysqlurls = "192.168.2.18:3306" mysqlparams = "charset=utf8mb4&parseTime=True&loc=Local"