From 4bc6f48c32f4643a6d367cebe49135ecb176c243 Mon Sep 17 00:00:00 2001 From: Jamie Date: Tue, 21 Nov 2023 09:54:07 +1300 Subject: [PATCH] cleanup --- migrations/back_37/back_37.go | 21 --------------------- migrations/back_37/utils/utils_test.go | 2 -- 2 files changed, 23 deletions(-) diff --git a/migrations/back_37/back_37.go b/migrations/back_37/back_37.go index 7424a9eef..4e0a2652b 100644 --- a/migrations/back_37/back_37.go +++ b/migrations/back_37/back_37.go @@ -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 } @@ -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"], diff --git a/migrations/back_37/utils/utils_test.go b/migrations/back_37/utils/utils_test.go index ab37794c8..5ab72ba02 100644 --- a/migrations/back_37/utils/utils_test.go +++ b/migrations/back_37/utils/utils_test.go @@ -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) {