Wrap most of fetch_events in a try/except JsonableError.

This is a no-op right now, but we'll want the new structure for the
next commit, and splitting this out makes it a lot easier to read what
is actually changed in the next commit.
This commit is contained in:
Tim Abbott 2015-12-27 11:36:20 -08:00
parent ad1494f8e0
commit 485e46f136
1 changed files with 34 additions and 30 deletions

View File

@ -447,6 +447,7 @@ def fetch_events(query):
client_type_name = query["client_type_name"]
handler_id = query["handler_id"]
try:
was_connected = False
orig_queue_id = queue_id
extra_log_data = ""
@ -481,6 +482,9 @@ def fetch_events(query):
if was_connected:
logging.info("Disconnected handler for queue %s (%s/%s)" % (queue_id, user_profile_email,
client_type_name))
except JsonableError as e:
raise e
client.connect_handler(handler_id, client_type_name)
return (RespondAsynchronously, None)