fix: 调整批量添加操作的批次大小为500
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user