jdemaeyer / brightsky

JSON API for DWD's open weather data.
https://brightsky.dev/
MIT License
287 stars 18 forks source link

Cache station list #154

Closed jdemaeyer closed 6 months ago

jdemaeyer commented 11 months ago

The dwd.de website had a prolonged intermittent outage this week. Even though the open data server had no availability issues, this led to our data becoming stales because we

a) load the station list when starting the worker, and b) frequently restart the worker in a cronjob on the production server.

We should cache this station list on the file system and fall back to that if dwd.de is unavailable. We could also consider disabling the cronjob as the memory issues it was a workaround for are now gone. I'm leaning towards leaving that one active though, as it's still a nice failsafe against unexpected hiccups during processing (at least once we added station list caching).

jdemaeyer commented 6 months ago

https://github.com/jdemaeyer/brightsky/commit/2cceed60dc0cd60b2500ba6782b70a7fb596ace3