From 6e44a46c6165c3e0d4d1d334137cba0b6b6c12ee Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期五, 04 九月 2020 19:47:23 +0800
Subject: [PATCH] add vip,fix manager msg
---
main.go | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/main.go b/main.go
index 2acffc9..1af406e 100644
--- a/main.go
+++ b/main.go
@@ -2,8 +2,11 @@
import (
"car-service/controllers"
+ "car-service/models"
_ "car-service/routers"
+ "car-service/service"
"github.com/astaxie/beego"
+ "github.com/robfig/cron"
)
func main() {
@@ -11,7 +14,13 @@
beego.BConfig.WebConfig.DirectoryIndex = true
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
}
- controllers.Schedule()
+ models.InitDb()
go controllers.ComputeSpaceLeftRealTime()
+ //姣忓ぉ鍚屾娴峰悍鏁版嵁锛岀湅浜哄憳id鏄惁鏈夊彂鐢熷彉鍖�
+ c := cron.New()
+ c.AddFunc("@daily", func() {
+ service.SyncHikPerson()
+ })
+ c.Start()
beego.Run()
}
--
Gitblit v1.8.0