From 330b23de4cb944f234da80a3484b88429d73ad40 Mon Sep 17 00:00:00 2001 From: zy Date: Fri, 1 Mar 2024 14:35:35 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6tdengine.dbname=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/logic/tdengine/td_engine.go | 2 +- pkg/tsd/internal/tdengine/device.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/logic/tdengine/td_engine.go b/internal/logic/tdengine/td_engine.go index d13a854..e86e890 100644 --- a/internal/logic/tdengine/td_engine.go +++ b/internal/logic/tdengine/td_engine.go @@ -32,7 +32,7 @@ var dbName = "sagoo_iot" func init() { service.RegisterTdEngine(tdEngineNew()) // 简化配置获取过程 - dbName = g.Cfg().MustGet(context.Background(), "tdengine.dbName", "sagoo_iot").String() + dbName = g.Cfg().MustGet(context.Background(), "tsd.tdengine.dbName", "sagoo_iot").String() } type connections struct { diff --git a/pkg/tsd/internal/tdengine/device.go b/pkg/tsd/internal/tdengine/device.go index 81e4909..33e16c9 100644 --- a/pkg/tsd/internal/tdengine/device.go +++ b/pkg/tsd/internal/tdengine/device.go @@ -158,7 +158,7 @@ func (m *TdEngine) BatchInsertMultiDeviceData(multiDeviceDataList map[string][]i if sqlBuilder.Len() > 15*1024 || i == len(multiDeviceDataList)-1 { trimmedSQL := strings.TrimRight(sqlBuilder.String(), " ") start := time.Now() // 开始时间 - //g.Log().Debug(context.Background(), "====06====BatchInsertDeviceData SQL:", trimmedSQL) + g.Log().Debug(context.Background(), "====06====BatchInsertDeviceData SQL:", trimmedSQL) _, err := m.db.Exec(trimmedSQL) if err != nil { g.Log().Error(context.Background(), err.Error(), trimmedSQL)