From fa6a06502d94227c0289a16dbba97195f00bca5b Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Tue, 14 Oct 2014 14:37:02 -0400 Subject: [PATCH] Change the default redis host to localhost. Fix some whitespace issues in the userevents module. --- config.py | 4 ++-- data/userevent.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config.py b/config.py index 5a8e3a858..ba3b90976 100644 --- a/config.py +++ b/config.py @@ -80,11 +80,11 @@ class DefaultConfig(object): AUTHENTICATION_TYPE = 'Database' # Build logs - BUILDLOGS_REDIS = {'host': 'logs.quay.io'} + BUILDLOGS_REDIS = {'host': 'localhost'} BUILDLOGS_OPTIONS = [] # Real-time user events - USER_EVENTS_REDIS = {'host': 'logs.quay.io'} + USER_EVENTS_REDIS = {'host': 'localhost'} # Stripe config BILLING_TYPE = 'FakeStripe' diff --git a/data/userevent.py b/data/userevent.py index b45d4e4fa..508ea572f 100644 --- a/data/userevent.py +++ b/data/userevent.py @@ -30,7 +30,7 @@ class UserEventsBuilderModule(object): if not redis_config: # This is the old key name. redis_config = { - 'host': app.config.get('USER_EVENTS_REDIS_HOSTNAME') + 'host': app.config.get('USER_EVENTS_REDIS_HOSTNAME'), } user_events = UserEventBuilder(redis_config) @@ -45,7 +45,7 @@ class UserEventsBuilderModule(object): class UserEvent(object): - """ + """ Defines a helper class for publishing to realtime user events as backed by Redis. """ @@ -74,7 +74,7 @@ class UserEvent(object): thread = threading.Thread(target=conduct) thread.start() - + class UserEventListener(object): """ Defines a helper class for subscribing to realtime user events as @@ -90,7 +90,7 @@ class UserEventListener(object): @staticmethod def _user_event_key(username, event_id): return 'user/%s/events/%s' % (username, event_id) - + def event_stream(self): """ Starts listening for events on the channel(s), yielding for each event