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)