Merge pull request #116 from dushixiang/be-fix-useless-code
fix(be):remove duplicate init
This commit is contained in:
commit
b064bf5333
4
main.go
4
main.go
@ -10,7 +10,6 @@ import (
|
|||||||
"next-terminal/server/repository"
|
"next-terminal/server/repository"
|
||||||
|
|
||||||
"github.com/labstack/gommon/log"
|
"github.com/labstack/gommon/log"
|
||||||
"github.com/robfig/cron/v3"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const Version = "v0.3.4"
|
const Version = "v0.3.4"
|
||||||
@ -35,9 +34,6 @@ func Run() error {
|
|||||||
// 为了兼容之前调用global包的代码 后期预期会改为调用pgk/config
|
// 为了兼容之前调用global包的代码 后期预期会改为调用pgk/config
|
||||||
global.Config = config.GlobalCfg
|
global.Config = config.GlobalCfg
|
||||||
|
|
||||||
global.Cron = cron.New(cron.WithSeconds()) //精确到秒
|
|
||||||
global.Cron.Start()
|
|
||||||
|
|
||||||
db := api.SetupDB()
|
db := api.SetupDB()
|
||||||
e := api.SetupRoutes(db)
|
e := api.SetupRoutes(db)
|
||||||
global.Cache = api.SetupCache()
|
global.Cache = api.SetupCache()
|
||||||
|
Loading…
Reference in New Issue
Block a user