From 0c6a425dd81572abd37557f5155c4354a80abee9 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Mon, 9 Dec 2024 18:22:37 +0800 Subject: [PATCH] update --- app/cfg/cfg_app.go | 2 ++ app/cfg/init_cfg.go | 3 +++ etc/cfg.yml | 8 ++++++++ go.mod | 2 +- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/cfg/cfg_app.go b/app/cfg/cfg_app.go index 8a04331..cbee93c 100644 --- a/app/cfg/cfg_app.go +++ b/app/cfg/cfg_app.go @@ -1,6 +1,7 @@ package cfg import ( + db "code.fnuoos.com/EggPlanet/egg_models.git/src" "time" ) @@ -12,6 +13,7 @@ type Config struct { RedisPassword string `yaml:"redis_password"` DB DBCfg `yaml:"db"` ImDB DBCfg `yaml:"im_db"` + BackUpDb db.BackUpDBCfg `yaml:"back_up_db"` MQ MQCfg `yaml:"mq"` Log LogCfg `yaml:"log"` ImBusinessRpc ImBusinessRpcCfg `yaml:"im_business_rpc"` diff --git a/app/cfg/init_cfg.go b/app/cfg/init_cfg.go index bdddb32..b736f87 100644 --- a/app/cfg/init_cfg.go +++ b/app/cfg/init_cfg.go @@ -1,6 +1,7 @@ package cfg import ( + db "code.fnuoos.com/EggPlanet/egg_models.git/src" "flag" "io/ioutil" @@ -15,6 +16,7 @@ var ( RedisAddr string RedisPassword string DB *DBCfg + BackUpDb *db.BackUpDBCfg IMDB *DBCfg MQ *MQCfg ES *ESCfg @@ -48,6 +50,7 @@ func InitCfg() { CurlDebug = conf.CurlDebug DB = &conf.DB IMDB = &conf.ImDB + BackUpDb = &conf.BackUpDb Log = &conf.Log RedisAddr = conf.RedisAddr MQ = &conf.MQ diff --git a/etc/cfg.yml b/etc/cfg.yml index 3e89860..bab1abc 100644 --- a/etc/cfg.yml +++ b/etc/cfg.yml @@ -19,6 +19,14 @@ db: max_idle_conns: 100 path: 'tmp/%s.log' +db_back: + host: '119.23.182.117:3306' + name: 'egg-data-back-up' + user: 'root' + psw: 'Fnuo123com@' + show_log: true + path: 'tmp/%s.log' + im_db: host: '119.23.182.117:3306' name: 'egg-im' diff --git a/go.mod b/go.mod index 94d8af4..bd4131d 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ go 1.19 // replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules require ( - code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241209061118-ae1be0db6a70 + code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241209100518-05d64c6d9224 code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241209075057-7fac1ca863a7 code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5