mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 04:12:02 +00:00
Don't log exceptions that we know aren't bugs when adding events to event queues
(imported from commit 55074e68603119bd11cc5218453a4e1eab710feb)
This commit is contained in:
@@ -100,6 +100,7 @@ class ClientDescriptor(object):
|
|||||||
|
|
||||||
def finish_current_handler(self):
|
def finish_current_handler(self):
|
||||||
if self.current_handler is not None:
|
if self.current_handler is not None:
|
||||||
|
err_msg = "Got error finishing handler for queue %s" % (self.event_queue.id,)
|
||||||
try:
|
try:
|
||||||
# We call async_request_restart here in case we are
|
# We call async_request_restart here in case we are
|
||||||
# being finished without any events (because another
|
# being finished without any events (because another
|
||||||
@@ -111,8 +112,14 @@ class ClientDescriptor(object):
|
|||||||
queue_id=self.event_queue.id),
|
queue_id=self.event_queue.id),
|
||||||
self.current_handler._request,
|
self.current_handler._request,
|
||||||
apply_markdown=self.apply_markdown)
|
apply_markdown=self.apply_markdown)
|
||||||
|
except IOError as e:
|
||||||
|
if e.message != 'Stream is closed':
|
||||||
|
logging.exception(err_msg)
|
||||||
|
except AssertionError as e:
|
||||||
|
if e.message != 'Request closed':
|
||||||
|
logging.exception(err_msg)
|
||||||
except Exception:
|
except Exception:
|
||||||
logging.exception("Got error finishing handler for queue %s" % (self.event_queue.id))
|
logging.exception(err_msg)
|
||||||
finally:
|
finally:
|
||||||
self.disconnect_handler()
|
self.disconnect_handler()
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user