Skip to content

Commit

Permalink
remove testing cap
Browse files Browse the repository at this point in the history
  • Loading branch information
jh-bate committed Dec 18, 2023
1 parent 5e1acbe commit 0364865
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 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 := 300
//testingCapSize := 300
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.Printf("migrated %d docs up to cap so exiting", totalMigrated)
break
}
// if totalMigrated >= testingCapSize {
// log.Printf("migrated %d docs up to cap so exiting", totalMigrated)
// break
// }
}
return nil
}
Expand Down
12 changes: 0 additions & 12 deletions migrations/20231128_jellyfish_migration/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ func GetDatumUpdates(bsonData bson.M) (string, bson.M, error) {
return errorDebug(datumID, err)
}
identityFields, err = datum.IdentityFields()
log.Printf("basal %s id %v", datumID, identityFields)
if err != nil {
return errorDebug(datumID, err)
}
Expand All @@ -110,7 +109,6 @@ func GetDatumUpdates(bsonData bson.M) (string, bson.M, error) {
return errorDebug(datumID, err)
}
identityFields, err = datum.IdentityFields()
log.Printf("bolus %s id %v", datumID, identityFields)
if err != nil {
return errorDebug(datumID, err)
}
Expand All @@ -121,7 +119,6 @@ func GetDatumUpdates(bsonData bson.M) (string, bson.M, error) {
return errorDebug(datumID, err)
}
identityFields, err = datum.IdentityFields()
log.Printf("device %s id %v", datumID, identityFields)
if err != nil {
return errorDebug(datumID, err)
}
Expand All @@ -132,7 +129,6 @@ func GetDatumUpdates(bsonData bson.M) (string, bson.M, error) {
return errorDebug(datumID, err)
}
identityFields, err = datum.IdentityFields()
log.Printf("pump %s id %v", datumID, identityFields)
if err != nil {
return errorDebug(datumID, err)
}
Expand Down Expand Up @@ -164,8 +160,6 @@ func GetDatumUpdates(bsonData bson.M) (string, bson.M, error) {
datum.Value = &val
}
identityFields, err = datum.IdentityFields()

log.Printf("smbg %s id %v", datumID, identityFields)
if err != nil {
return errorDebug(datumID, err)
}
Expand All @@ -182,7 +176,6 @@ func GetDatumUpdates(bsonData bson.M) (string, bson.M, error) {
datum.Value = &val
}
identityFields, err = datum.IdentityFields()
log.Printf("ketone %s id %v", datumID, identityFields)
if err != nil {
return errorDebug(datumID, err)
}
Expand All @@ -199,7 +192,6 @@ func GetDatumUpdates(bsonData bson.M) (string, bson.M, error) {
datum.Value = &val
}
identityFields, err = datum.IdentityFields()
log.Printf("cbg %s id %v", datumID, identityFields)
if err != nil {
return errorDebug(datumID, err)
}
Expand All @@ -210,7 +202,6 @@ func GetDatumUpdates(bsonData bson.M) (string, bson.M, error) {
return errorDebug(datumID, err)
}
identityFields, err = datum.IdentityFields()
log.Printf("default %s id %v", datumID, identityFields)
if err != nil {
return errorDebug(datumID, err)
}
Expand All @@ -221,8 +212,5 @@ func GetDatumUpdates(bsonData bson.M) (string, bson.M, error) {
return errorDebug(datumID, err)
}
updates["_deduplicator"] = bson.M{"hash": hash}

log.Printf("datum %s updates %v", datumID, updates)

return datumID, updates, nil
}

0 comments on commit 0364865

Please sign in to comment.