Change user events tutorial Redis error to be an inline box

Fixes #1653
This commit is contained in:
Joseph Schorr 2016-07-27 13:41:26 -07:00
parent d240ad9a2c
commit cb9a99fc7b
3 changed files with 19 additions and 3 deletions

View file

@ -99,6 +99,8 @@ def user_test():
@require_session_login
def user_subscribe():
def wrapper(listener):
yield 'data: %s\n\n' % json.dumps({})
for event_id, data in listener.event_stream():
message = {'event': event_id, 'data': data}
json_string = json.dumps(message)