diff --git a/core/cleanup.py b/core/cleanup.py index 0a2a3f5..800b582 100644 --- a/core/cleanup.py +++ b/core/cleanup.py @@ -43,7 +43,7 @@ class CleanupTimer: try: for i in list(DATA_STORE.spots.keys()): try: - spot = DATA_STORE.spots[i] + spot = DATA_STORE.spots.get(i) if spot.expired(): DATA_STORE.spots.delete(i) except KeyError: @@ -51,7 +51,7 @@ class CleanupTimer: pass for i in list(DATA_STORE.alerts.keys()): try: - alert = DATA_STORE.alerts[i] + alert = DATA_STORE.alerts.get(i) if alert.expired(): DATA_STORE.alerts.delete(i) except KeyError: diff --git a/core/data_store.py b/core/data_store.py index f58720c..97ae973 100644 --- a/core/data_store.py +++ b/core/data_store.py @@ -103,6 +103,9 @@ class DataStore: self.dxcc_lookup_by_call_regex.append((re.compile(entry["prefixRegex"]), entry["entityCode"])) def close(self): + self.spots.save_snapshot() + self.alerts.save_snapshot() + self.spots.close() self.alerts.close() self._solar.close() diff --git a/templates/add_spot.html b/templates/add_spot.html index 2e0683b..8163620 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 8cb85d2..3c00668 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -82,7 +82,7 @@ - + diff --git a/templates/bands.html b/templates/bands.html index 1241abf..8286586 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -79,8 +79,8 @@ - - + + diff --git a/templates/base.html b/templates/base.html index 6a02ef6..5d18d8a 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,6 @@ {% extends "skeleton.html" %} {% block head_extra %} - + @@ -10,10 +10,10 @@ - - - - + + + + {% end %} {% block body %}