fix pages
All checks were successful
Build and push image / deploy (push) Successful in 1m39s

This commit is contained in:
2023-12-27 00:24:13 +03:00
parent 3bbc6a0baa
commit 9cdf9aa7dc

View File

@ -49,15 +49,15 @@ var sumpayCommand = &cli.Command{
} }
log.Printf("inserting %d goods to DB", len(goods.Rows.Row)) log.Printf("inserting %d goods to DB", len(goods.Rows.Row))
if len(goods.Rows.Row) < 500 {
break
}
gormGoods := convertDigiGoodsToGorm(goods) gormGoods := convertDigiGoodsToGorm(goods)
if err := db.Create(gormGoods).Error; err != nil { if err := db.Create(gormGoods).Error; err != nil {
return fmt.Errorf("db Create: %w", err) return fmt.Errorf("db Create: %w", err)
} }
log.Printf("inserted %d goods to DB", len(gormGoods)) log.Printf("inserted %d goods to DB", len(gormGoods))
if len(goods.Rows.Row) < 500 {
break
}
} }
} }