Fix the tutorial's user events
This commit is contained in:
parent
036c8e56e0
commit
094f91fb8b
3 changed files with 19 additions and 20 deletions
|
@ -1,6 +1,9 @@
|
|||
import redis
|
||||
import json
|
||||
import threading
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class UserEventBuilder(object):
|
||||
"""
|
||||
|
@ -68,8 +71,9 @@ class UserEvent(object):
|
|||
def conduct():
|
||||
try:
|
||||
self.publish_event_data_sync(event_id, data_obj)
|
||||
except Exception as e:
|
||||
print e
|
||||
logger.debug('Published user event %s: %s', event_id, data_obj)
|
||||
except Exception:
|
||||
logger.exception('Could not publish user event')
|
||||
|
||||
thread = threading.Thread(target=conduct)
|
||||
thread.start()
|
||||
|
|
Reference in a new issue