fix WebSocket path
This commit is contained in:
parent
ca33af9074
commit
7d850e2ab3
1 changed files with 3 additions and 4 deletions
|
@ -626,7 +626,7 @@ class EventsHandler(CollectionHandler):
|
|||
ret = {'action': 'add', 'person_id': person_id, 'person': data, 'uuid': uuid}
|
||||
if '_id' in data:
|
||||
del data['_id']
|
||||
self.send_ws_message('event/%s/updates' % id_, json.dumps(ret))
|
||||
self.send_ws_message('event/%s/tickets/updates' % id_, json.dumps(ret))
|
||||
if not doc:
|
||||
data['_id'] = self.gen_id()
|
||||
merged, doc = self.db.update('events',
|
||||
|
@ -666,7 +666,7 @@ class EventsHandler(CollectionHandler):
|
|||
doc.get('persons') or [])
|
||||
env = self._dict2env(new_person_data)
|
||||
# always takes the person_id from the new person (it may have
|
||||
# be a ticket_id).
|
||||
# been a ticket_id).
|
||||
person_id = str(new_person_data.get('person_id'))
|
||||
env.update({'PERSON_ID': person_id, 'EVENT_ID': id_,
|
||||
'EVENT_TITLE': doc.get('title', ''), 'WEB_USER': self.current_user,
|
||||
|
@ -701,7 +701,7 @@ class EventsHandler(CollectionHandler):
|
|||
{'persons': {'person_id': person_id}},
|
||||
operation='delete',
|
||||
create=False)
|
||||
self.send_ws_message('event/%s/updates' % id_, json.dumps(ret))
|
||||
self.send_ws_message('event/%s/tickets/updates' % id_, json.dumps(ret))
|
||||
return ret
|
||||
|
||||
handle_delete_tickets = handle_delete_persons
|
||||
|
@ -832,7 +832,6 @@ class WebSocketEventUpdatesHandler(tornado.websocket.WebSocketHandler):
|
|||
|
||||
def open(self, event_id, *args, **kwds):
|
||||
logging.debug('WebSocketEventUpdatesHandler.on_open event_id:%s' % event_id)
|
||||
|
||||
_ws_clients.setdefault(self._clean_url(self.request.uri), set()).add(self)
|
||||
logging.debug('WebSocketEventUpdatesHandler.on_open %s clients connected' % len(_ws_clients))
|
||||
|
||||
|
|
Loading…
Reference in a new issue