Closed amsesk closed 1 year ago
Heya, thanks for the PR, I'll take a look.
I really would like to merge the changes, but I'm not sure if I should, because there's an interval of 30 minutes in the weather.ini file, and because the script would be running until it gets a result I'm not sure if this would create another process if the script kept running for some reason (maybe no internet or something related). I do need to make some changes in this code, I forgot to properly handle the exceptions. Thanks again for the PR, I'd suggest to keep the changes you made since it's working for you. BTW just made an update, try and see if it works now!
That completely makes sense. You're right that in the case of no internet connection that my solution would maintain a totally extraneous process - good point.
I like what you did with the HTTP adapter configured for retries and a sensible timeout period. I imagine f136c19 will fix the issue I was having too, whatever the exact cause was.
Thanks for fixing this up and for maintaining this repo - I didn't really know where to start with polybar config and your repo has really helped contextualize things!
I was having an issue on my system where the weather module wasn't displaying on login while using the lofi theme. At the subsequent interval (as defined in
themes/lofi/modules/weather.ini
), the temperature and icon would suddenly appear. I tracked this down to theget_weather
function in scripts/weather/main.py returningNone
.In this pull request, I add code that waits for
get_weather
to return a dictionary of values before proceeding. I did not track down the cause ofget_weather
returningNone
shortly after login, so that remains a mystery.