mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
Fix a bug where solar conditions and status data were not properly persisted to disk between restarts. Release v2.0.5
This commit is contained in:
@@ -16,7 +16,7 @@ class SolarConditionsProvider:
|
||||
self.enabled = provider_config.get("enabled", True)
|
||||
self.last_update_time = datetime.min.replace(tzinfo=pytz.UTC)
|
||||
self.status = "Not Started" if self.enabled else "Disabled"
|
||||
self._solar_conditions = DATA_STORE.solar_conditions
|
||||
self._solar_conditions = DATA_STORE.solar_conditions.get()
|
||||
|
||||
def start(self):
|
||||
"""Start the provider. This should return immediately after spawning threads to access the remote resources"""
|
||||
@@ -36,3 +36,4 @@ class SolarConditionsProvider:
|
||||
if hasattr(self._solar_conditions, key):
|
||||
setattr(self._solar_conditions, key, value)
|
||||
self._solar_conditions.infer_descriptions()
|
||||
DATA_STORE.solar_conditions.store()
|
||||
|
||||
Reference in New Issue
Block a user