fix: 调整批量添加操作的批次大小为500

This commit is contained in:
TsMask
2025-03-05 19:36:46 +08:00
parent 0c83bcecc6
commit 8da9948d06
4 changed files with 4 additions and 4 deletions

View File

@@ -77,7 +77,7 @@ func (r ChartGraph) SelectGroup() []string {
// Insert 批量添加
func (r ChartGraph) Inserts(graphs []model.ChartGraph) int64 {
tx := db.DB("").CreateInBatches(graphs, 2000)
tx := db.DB("").CreateInBatches(graphs, 500)
if err := tx.Error; err != nil {
logger.Errorf("CreateInBatches err => %v", err)
}