This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/util/config/database.py
2018-07-20 12:46:19 -04:00

10 lines
378 B
Python

from data import model, appr_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)
appr_model.blob.ensure_blob_locations(*location_names)