mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +00:00
Clean up debugging logs from tracking down slow receive.
(imported from commit e4b1f763522406255ce8be3c8d51b5d855a770cd)
This commit is contained in:
@@ -91,10 +91,6 @@ class ClientDescriptor(object):
|
|||||||
async_request_restart(self.current_handler._request)
|
async_request_restart(self.current_handler._request)
|
||||||
|
|
||||||
self.event_queue.push(event)
|
self.event_queue.push(event)
|
||||||
logging.info("DEBUG: Added %s event to queue %s: handler is %s" % (
|
|
||||||
event.get("type"),
|
|
||||||
self.event_queue.id,
|
|
||||||
self.current_handler is not None))
|
|
||||||
if self.current_handler is not None:
|
if self.current_handler is not None:
|
||||||
try:
|
try:
|
||||||
self.current_handler._request._log_data['extra'] = "[%s/1]" % (self.event_queue.id,)
|
self.current_handler._request._log_data['extra'] = "[%s/1]" % (self.event_queue.id,)
|
||||||
@@ -103,10 +99,8 @@ 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)
|
||||||
logging.info("DEBUG: Successfully called back on queue %s" % (self.event_queue.id))
|
|
||||||
except socket.error:
|
except socket.error:
|
||||||
logging.info("DEBUG: Got error adding event to queue %s" % (self.event_queue.id))
|
logging.exception("Got error adding event to queue %s" % (self.event_queue.id))
|
||||||
traceback.print_exc()
|
|
||||||
self.disconnect_handler()
|
self.disconnect_handler()
|
||||||
|
|
||||||
def accepts_event_type(self, type):
|
def accepts_event_type(self, type):
|
||||||
@@ -132,11 +126,8 @@ class ClientDescriptor(object):
|
|||||||
heartbeat_time = time.time() + HEARTBEAT_MIN_FREQ_SECS + random.randint(0, 10)
|
heartbeat_time = time.time() + HEARTBEAT_MIN_FREQ_SECS + random.randint(0, 10)
|
||||||
if self.client_type.name != 'API: heartbeat test':
|
if self.client_type.name != 'API: heartbeat test':
|
||||||
self._timeout_handle = ioloop.add_timeout(heartbeat_time, timeout_callback)
|
self._timeout_handle = ioloop.add_timeout(heartbeat_time, timeout_callback)
|
||||||
logging.info("DEBUG: connected handler for queue %s" % (self.event_queue.id,))
|
|
||||||
|
|
||||||
def disconnect_handler(self):
|
def disconnect_handler(self):
|
||||||
if self.current_handler is not None:
|
|
||||||
logging.info("DEBUG: disconnected handler for queue %s" % (self.event_queue.id,))
|
|
||||||
self.current_handler = None
|
self.current_handler = None
|
||||||
if self._timeout_handle is not None:
|
if self._timeout_handle is not None:
|
||||||
ioloop = tornado.ioloop.IOLoop.instance()
|
ioloop = tornado.ioloop.IOLoop.instance()
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ def get_events_backend(request, user_profile, handler = None,
|
|||||||
queue_id = client.event_queue.id
|
queue_id = client.event_queue.id
|
||||||
else:
|
else:
|
||||||
return json_error("Missing 'queue_id' argument")
|
return json_error("Missing 'queue_id' argument")
|
||||||
logging.info("DEBUG: created queue %s" % (queue_id,))
|
|
||||||
else:
|
else:
|
||||||
if last_event_id is None:
|
if last_event_id is None:
|
||||||
return json_error("Missing 'last_event_id' argument")
|
return json_error("Missing 'last_event_id' argument")
|
||||||
|
|||||||
Reference in New Issue
Block a user