From a30a94792e29b20141e53c3692853e3a8a59107f Mon Sep 17 00:00:00 2001 From: dengbiao Date: Thu, 12 Dec 2024 14:33:27 +0800 Subject: [PATCH] update --- app/cfg/init_task.go | 2 ++ cmd/task/main.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/cfg/init_task.go b/app/cfg/init_task.go index 2a049fd..eff3e96 100644 --- a/app/cfg/init_task.go +++ b/app/cfg/init_task.go @@ -30,6 +30,8 @@ func InitTaskCfg() { IMDB = &conf.ImDB Log = &conf.Log RedisAddr = conf.RedisAddr + MQ = &conf.MQ + ES = &conf.ES } var MemCache mc.Cache diff --git a/cmd/task/main.go b/cmd/task/main.go index e6daccb..fb39639 100644 --- a/cmd/task/main.go +++ b/cmd/task/main.go @@ -20,6 +20,8 @@ func init() { cfg.InitLog() // 初始化redis cfg.InitCache() + cfg.InitMq() // 队列初始化 + cfg.InitEs() //ElasticSearch初始化 baseDb := *cfg.DB baseDb.Path = fmt.Sprintf(cfg.DB.Path, cfg.DB.Name) if err := db.InitDB(&baseDb); err != nil {