diff --git a/providers/spot/dxcluster.py b/providers/spot/dxcluster.py index 6f39b26..28248e9 100644 --- a/providers/spot/dxcluster.py +++ b/providers/spot/dxcluster.py @@ -93,6 +93,15 @@ class DXCluster(SpotProvider): self.last_update_time = datetime.now(pytz.UTC) logging.debug("Data received from DX Cluster " + self._hostname + ".") + except EOFError: + connected = False + if self._running: + self.status = "Restarting" + logging.warning("Disconnected from DX Cluster " + self._hostname + ". Reconnecting...") + sleep(5) + else: + logging.info("DX Cluster " + self._hostname + " shutting down...") + self.status = "Shutting down" except Exception: connected = False if self._running: diff --git a/providers/spot/rbn.py b/providers/spot/rbn.py index 050c4a8..6894d25 100644 --- a/providers/spot/rbn.py +++ b/providers/spot/rbn.py @@ -80,6 +80,15 @@ class RBN(SpotProvider): self.last_update_time = datetime.now(pytz.UTC) logging.debug("Data received from RBN on port " + str(self._port) + ".") + except EOFError: + connected = False + if self._running: + self.status = "Restarting" + logging.warning("Disconnected from RBN provider (port " + str(self._port) + "). Reconnecting...") + sleep(5) + else: + logging.info("RBN provider (port " + str(self._port) + ") shutting down...") + self.status = "Shutting down" except Exception: connected = False if self._running: diff --git a/templates/add_spot.html b/templates/add_spot.html index 8f13ea9..9f0944a 100644 --- a/templates/add_spot.html +++ b/templates/add_spot.html @@ -76,7 +76,7 @@ - + diff --git a/templates/alerts.html b/templates/alerts.html index f8d6d79..91b3632 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -82,7 +82,7 @@ - + diff --git a/templates/bands.html b/templates/bands.html index 066ad03..63a94d0 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -79,8 +79,8 @@ - - + + diff --git a/templates/base.html b/templates/base.html index a60793c..c954de4 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,6 @@ {% extends "skeleton.html" %} {% block head_extra %} - + @@ -15,10 +15,10 @@ window.fetchEventSource = fetchEventSource; - - - - + + + + {% end %} {% block body %}