SSE server reliability improvements

This commit is contained in:
Ian Renton
2026-06-05 16:17:29 +01:00
parent f6622bb942
commit 6938a8cc0a
11 changed files with 26 additions and 26 deletions

View File

@@ -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()

View File

@@ -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()