Split out the redis hostname for user events and build logs as a string config. Modularize the user events and fix all callers.

This commit is contained in:
Jake Moshenko 2014-05-30 14:25:29 -04:00
parent 4c1538ca90
commit d1f4fbdacc
6 changed files with 37 additions and 12 deletions

View file

@ -89,6 +89,7 @@ class BuildLogs(object):
self.state = None
def init_app(self, app):
buildlogs_hostname = app.config.get('BUILDLOGS_REDIS_HOSTNAME')
buildlogs_options = app.config.get('BUILDLOGS_OPTIONS', [])
buildlogs_import = app.config.get('BUILDLOGS_MODULE_AND_CLASS', None)
@ -97,7 +98,7 @@ class BuildLogs(object):
else:
klass = import_class(buildlogs_import[0], buildlogs_import[1])
buildlogs = klass(*buildlogs_options)
buildlogs = klass(buildlogs_hostname, *buildlogs_options)
# register extension with app
app.extensions = getattr(app, 'extensions', {})