@@ -109,6 +109,11 @@ func MysqlInit(mm *entity.Mysql) {
}
GlobalCommonData.Init()
+ if mm.JyCk.Address != "" {
+ logx.Info("--初始化 jy clickhouse--")
+ CkJy = mysql.NewInit(mysql.CLICKHOUSE, fmt.Sprintf("clickhouse://%s:%s@%s/%s", mm.JyCk.UserName, mm.JyCk.Password, mm.JyCk.Address, mm.JyCk.DbName),
+ mm.JyCk.MaxOpenConns, mm.JyCk.MaxIdleConns)
+ }
P.BidCodeMapping.Init(BaseServiceMysql)
@@ -26,7 +26,6 @@ func InitC() {
RedisInit(&DB.Redis)
//初始es
EsInit(&DB.Es)
- CkInit(&DB.Mysql)
Middleground = middleground.NewMiddleground(C.CodeServiceConf.Etcd.Hosts).
RegUserCenter(C.UserCenterKey).
RegPowerCheckCenter(C.PowerCheckCenterKey).
@@ -25,9 +25,8 @@ type Config struct {
type Db struct {
- Mysql entity.Mysql `json:"mysql"`
- Redis entity.RedisStuct `json:"redis"`
- Es entity.EsStruct `json:"es"`
- Mongo entity.Mongo `json:"mongo"`
- ClickHouse entity.Mysql `json:"clickhouse"`
+ Mysql entity.Mysql `json:"mysql"`
+ Redis entity.RedisStuct `json:"redis"`
+ Es entity.EsStruct `json:"es"`
+ Mongo entity.Mongo `json:"mongo"`