Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jh-bate committed Nov 20, 2023
1 parent 47b7c2f commit 4bc6f48
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
21 changes: 0 additions & 21 deletions migrations/back_37/back_37.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ func (m *Migration) execute() error {
hashUpdatedCount, errorCount := m.migrateJellyfishDocuments()
m.Logger().Infof("Migrated %d jellyfish documents", hashUpdatedCount)
m.Logger().Infof("%d errors occurred", errorCount)

return nil
}

Expand Down Expand Up @@ -130,31 +129,11 @@ func (m *Migration) migrateDocument(jfDatum bson.M) (bool, error) {
return false, err
}

// updates := bson.M{}
// hash, err := utils.CreateDatumHash(jfDatum)
// if err != nil {
// return false, err
// }

// updates["_deduplicator"] = bson.M{"hash": hash}

updates, err := utils.GetDatumUpdates(jfDatum)
if err != nil {
return false, err
}

// if boluses, err := utils.UpdateIfExistsPumpSettingsBolus(jfDatum); err != nil {
// return false, err
// } else if boluses != nil {
// updates["boluses"] = boluses
// }

// if sleepSchedules, err := utils.UpdateIfExistsPumpSettingsSleepSchedules(jfDatum); err != nil {
// return false, err
// } else if sleepSchedules != nil {
// updates["sleepSchedules"] = sleepSchedules
// }

result, err := m.dataRepository.UpdateOne(m.ctx, bson.M{
"_id": datumID,
"modifiedTime": jfDatum["modifiedTime"],
Expand Down
2 changes: 0 additions & 2 deletions migrations/back_37/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ import (
)

var _ = Describe("back-37", func() {

var _ = Describe("utils", func() {

Context("GetBGValuePlatformPrecision", func() {
DescribeTable("return the expected mmol/L value",
func(jellyfishVal float64, expectedVal float64) {
Expand Down

0 comments on commit 4bc6f48

Please sign in to comment.