mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-06-24 05:35:10 +00:00
SSE server reliability improvements
This commit is contained in:
@@ -102,7 +102,7 @@ class APIAlertsStreamHandler(tornado_eventsource.handler.EventSourceHandler):
|
||||
self.write_message("keepalive", "")
|
||||
|
||||
except Exception as e:
|
||||
logging.warning("Exception when serving SSE socket", e)
|
||||
logging.warning("Exception when serving SSE socket: %s", e, exc_info=True)
|
||||
self.close()
|
||||
|
||||
def close(self):
|
||||
@@ -144,7 +144,7 @@ class APIAlertsStreamHandler(tornado_eventsource.handler.EventSourceHandler):
|
||||
logging.error("Web server cleared up a queue of an active connection!")
|
||||
self.close()
|
||||
except:
|
||||
logging.warning("Exception in SSE callback, connection will be closed.")
|
||||
logging.warning("Exception in SSE callback, connection will be closed: %s", e, exc_info=True)
|
||||
self.close()
|
||||
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ class APISpotsStreamHandler(tornado_eventsource.handler.EventSourceHandler):
|
||||
self.write_message("keepalive", "")
|
||||
|
||||
except Exception as e:
|
||||
logging.warning("Exception when serving SSE socket", e)
|
||||
logging.warning("Exception when serving SSE socket: %s", e, exc_info=True)
|
||||
self.close()
|
||||
|
||||
def close(self):
|
||||
@@ -146,7 +146,7 @@ class APISpotsStreamHandler(tornado_eventsource.handler.EventSourceHandler):
|
||||
logging.error("Web server cleared up a queue of an active connection!")
|
||||
self.close()
|
||||
except:
|
||||
logging.warning("Exception in SSE callback, connection will be closed.")
|
||||
logging.warning("Exception in SSE callback, connection will be closed: %s", e, exc_info=True)
|
||||
self.close()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user