上传统计数据时自动清理旧数据

This commit is contained in:
GoEdgeLab
2021-07-28 17:04:31 +08:00
parent fe3173bc0b
commit 2de2c238c8
5 changed files with 34 additions and 4 deletions

View File

@@ -195,7 +195,7 @@ func (this *MetricItemDAO) UpdateItem(tx *dbs.Tx, itemId int64, name string, key
// 删除旧数据
if versionChanged {
err := SharedMetricStatDAO.DeleteOldItemStats(tx, itemId, types.Int32(oldItem.Version+1))
err := SharedMetricStatDAO.DeleteOldVersionItemStats(tx, itemId, types.Int32(oldItem.Version+1))
if err != nil {
return err
}