superuser: add storage replication config

This commit is contained in:
Silas Sewell 2015-10-26 16:06:05 -07:00
parent c33ae0e896
commit 5000b1621c
15 changed files with 357 additions and 106 deletions

9
util/config/database.py Normal file
View file

@ -0,0 +1,9 @@
from data import model
def sync_database_with_config(config):
""" This ensures all implicitly required reference table entries exist in the database. """
location_names = config.get('DISTRIBUTED_STORAGE_CONFIG', {}).keys()
if location_names:
model.image.ensure_image_locations(*location_names)