Change the default redis host to localhost. Fix some whitespace issues in the userevents module.
This commit is contained in:
parent
44637dad96
commit
fa6a06502d
2 changed files with 6 additions and 6 deletions
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in a new issue