SQL based tests and refactored Celery setup stuff

- Changed config files of test configs to use SQL
 - Updated celery initialization tools, factored them to be able to
   use the "big instance" application stuff
This commit is contained in:
Christopher Allan Webber
2012-03-26 11:14:11 -05:00
parent 7ccf418185
commit d693f6bd86
4 changed files with 62 additions and 33 deletions

View File

@@ -65,14 +65,13 @@ def gather_database_data(media_types):
return managed_dbdata
def dbupdate(args):
def run_dbupdate(app_config):
"""
Initialize or migrate the database as specified by the config file.
Will also initialize or migrate all extensions (media types, and
in the future, plugins)
"""
globa_config, app_config = setup_global_and_app_config(args.conf_file)
# Gather information from all media managers / projects
dbdatas = gather_database_data(app_config['media_types'])
@@ -87,3 +86,8 @@ def dbupdate(args):
for dbdata in dbdatas:
migration_manager = dbdata.make_migration_manager(Session())
migration_manager.init_or_migrate()
def dbupdate(args):
global_config, app_config = setup_global_and_app_config(args.conf_file)
run_dbupdate(app_config)