Skip to content

Commit

Permalink
Discard old profiles once migrated
Browse files Browse the repository at this point in the history
  • Loading branch information
keeshux committed Nov 17, 2024
1 parent d3e3446 commit 6c1eec7
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ private extension MigrateView {
model.statuses[$0.id] == .done
}
pp_log(.App.migration, .notice, "Migrated \(migrated.count) profiles")
do {
try await migrationManager.deleteMigratableProfiles(withIds: Set(migrated.map(\.id)))
pp_log(.App.migration, .notice, "Discarded \(migrated.count) migrated profiles from old store")
} catch {
pp_log(.App.migration, .error, "Unable to discard migrated profiles: \(error)")
}
model.step = .migrated(migrated)
} catch {
pp_log(.App.migration, .error, "Unable to migrate profiles: \(error)")
Expand Down

0 comments on commit 6c1eec7

Please sign in to comment.