コード例 #1
0
def update_database(conf):
    """Do any database updates required at process boot time, such as
    updating the traits table.
    """
    ctx = db_api.DbContext()
    trait.ensure_sync(ctx)
    resource_class.ensure_sync(ctx)
    rc_cache.ensure(ctx)
コード例 #2
0
def update_database(conf):
    """Do any database updates required at process boot time, such as
    updating the traits table.
    """
    if conf.placement_database.sync_on_startup:
        migration.upgrade('head')
    ctx = db_api.DbContext()
    trait.ensure_sync(ctx)
    resource_class.ensure_sync(ctx)