Commit cda49c85 authored by echel0n's avatar echel0n

Added code back to carry over notifications when a page refresh occurs

parent 1d012df5
# Changelog
- * 61140e5 - 2018-12-17: Reverted usage of `next` to `continue` in mako views
- * b1187b6 - 2018-12-17: Added code back to carry over notifications when a page refresh occurs
- * 1d012df - 2018-12-17: Reverted usage of `next` to `continue` in mako views
- * 3865c15 - 2018-12-16: Release v9.4.55
- * 164c01f - 2018-12-16: Moved columns button in display show view.
- * 5e64b16 - 2018-12-16: Release v9.4.54
......
import json
from tornado.websocket import WebSocketHandler
from tornado.websocket import WebSocketHandler, WebSocketClosedError
import sickrage
......@@ -18,11 +18,11 @@ class WebSocketUIHandler(WebSocketHandler):
"""Client connected to the WebSocket."""
clients.add(self)
# for n in sickrage.app.alerts.get_notifications(self.request.remote_ip):
# try:
# self.write_message(WebSocketMessage('notification', n.data).json())
# except WebSocketClosedError:
# pass
for n in sickrage.app.alerts.get_notifications(self.request.remote_ip):
try:
self.write_message(WebSocketMessage('notification', n.data).json())
except WebSocketClosedError:
pass
def on_message(self, message):
"""Received a message from the client."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment