Skip to content

Commit

Permalink
remove cap
Browse files Browse the repository at this point in the history
  • Loading branch information
jh-bate committed Dec 14, 2023
1 parent 9cf31b3 commit f3eecc9
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (m *Migration) prepare() error {

func (m *Migration) execute() error {
totalMigrated := 0
testingCapSize := 1000
//testingCapSize := 1000
for m.fetchAndUpdateBatch() {
updatedCount, err := m.writeBatchUpdates()
if err != nil {
Expand All @@ -192,10 +192,10 @@ func (m *Migration) execute() error {
}
totalMigrated = totalMigrated + updatedCount
log.Printf("migrated %d for a total of %d migrated items", updatedCount, totalMigrated)
if totalMigrated >= testingCapSize {
log.Println("migrated docs up to cap so exiting")
break
}
// if totalMigrated >= testingCapSize {
// log.Println("migrated docs up to cap so exiting")
// break
// }
}
return nil
}
Expand Down

0 comments on commit f3eecc9

Please sign in to comment.