Background
Low-priority follow-up to NASA-AMMOS/plandev-gateway#109 - this PR includes a “faux transaction” ie. our code rolls back DB state if anything goes wrong during import to avoid corruption. This is theoretically almost as safe as a DB transaction, unless gateway dies/errors halfway through.
Description
We'd like to refactor the gateway to use "real" DB transactions for Plan Import (& potentially other similar operations). However this is complicated by two things:
Background
Low-priority follow-up to NASA-AMMOS/plandev-gateway#109 - this PR includes a “faux transaction” ie. our code rolls back DB state if anything goes wrong during import to avoid corruption. This is theoretically almost as safe as a DB transaction, unless gateway dies/errors halfway through.
Description
We'd like to refactor the gateway to use "real" DB transactions for Plan Import (& potentially other similar operations). However this is complicated by two things: