Phase 2 of Appr migration

Backfills the new tables from the old ones, and switches all code to read and write from the new tables
This commit is contained in:
Joseph Schorr 2018-07-08 10:15:43 +03:00
parent d75e932d09
commit acb7d626a4
4 changed files with 38 additions and 9 deletions

View file

@ -1,6 +1,6 @@
from data import model
from data.appr_model import blob
from data.appr_model.models import OLD_MODELS
from data.appr_model.models import NEW_MODELS
def sync_database_with_config(config):
@ -9,4 +9,4 @@ def sync_database_with_config(config):
location_names = config.get('DISTRIBUTED_STORAGE_CONFIG', {}).keys()
if location_names:
model.image.ensure_image_locations(*location_names)
blob.ensure_blob_locations(OLD_MODELS, *location_names)
blob.ensure_blob_locations(NEW_MODELS, *location_names)