Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeout forecase and moonphase at one second #1355

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

josephkerkhof
Copy link

@josephkerkhof josephkerkhof commented Aug 28, 2023

If there is a network disruption or downtime for the wttr.in service, the curl command should timeout. If the curl command does not have a timeout, it would prevent other dwmblocks from being updated while the sb-forecast or sb-moonphase hangs.

I chose the timeout to be 1 second to be consistent with other status bar scripts like sb-price and sb-iplocate. One second also makes sense because some dwmblock scripts update every second.

@appeasementPolitik
Copy link
Contributor

appeasementPolitik commented Aug 29, 2023

Also look at this PR, I've solved this problem by doing the curl downloading in the background so the rest of the statusbar can run instantly. If there's no internet connection or curl fails, it checks and/or retries every 60 seconds:

#1296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants