socket: Fix non-rabbitmq codepath

(imported from commit 3ccdcbfb3283fc57ca502878e9c8d6068e7bce40)
This commit is contained in:
Zev Benjamin 2013-11-12 16:15:52 -05:00
parent c7d9bf41bc
commit cf8cf1fe03
1 changed files with 7 additions and 1 deletions

View File

@ -185,6 +185,9 @@ class SocketConnection(sockjs.tornado.SockJSConnection):
client_name='?')
def fake_message_sender(event):
log_data = dict()
record_request_start_data(log_data)
req = event['request']
try:
sender = get_user_profile_by_id(event['server_meta']['user_id'])
@ -197,8 +200,11 @@ def fake_message_sender(event):
except JsonableError as e:
resp = {"result": "error", "msg": str(e)}
server_meta = event['server_meta']
server_meta.update({'worker_log_data': log_data,
'time_request_finished': time.time()})
result = {'response': resp, 'req_id': event['req_id'],
'server_meta': event['server_meta']}
'server_meta': server_meta}
respond_send_message(result)
def respond_send_message(data):