Clean up mixpanel analytics a bit.
This commit is contained in:
parent
6266dd0ea4
commit
013e27f7d5
1 changed files with 3 additions and 4 deletions
|
@ -37,7 +37,7 @@ class SendToMixpanel(Thread):
|
|||
logger.exception('Failed to send Mixpanel request.')
|
||||
|
||||
|
||||
class FakeMixpanel(object):
|
||||
class _FakeMixpanel(object):
|
||||
def track(*args, **kwargs):
|
||||
pass
|
||||
|
||||
|
@ -55,15 +55,14 @@ class Analytics(object):
|
|||
|
||||
if analytics_type == 'Mixpanel':
|
||||
mixpanel_key = app.config.get('MIXPANEL_KEY', '')
|
||||
logger.debug('Initializing mixpanel with key: %s' %
|
||||
app.config['MIXPANEL_KEY'])
|
||||
logger.debug('Initializing mixpanel with key: %s', app.config['MIXPANEL_KEY'])
|
||||
|
||||
request_queue = Queue()
|
||||
analytics = Mixpanel(mixpanel_key, MixpanelQueuingConsumer(request_queue))
|
||||
SendToMixpanel(request_queue).start()
|
||||
|
||||
else:
|
||||
analytics = FakeMixpanel()
|
||||
analytics = _FakeMixpanel()
|
||||
|
||||
# register extension with app
|
||||
app.extensions = getattr(app, 'extensions', {})
|
||||
|
|
Reference in a new issue