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

dwmblocks hangs on sb-forecast/sb-moonphase #1295

Open
ssnailed opened this issue Mar 31, 2023 · 3 comments · May be fixed by #1296
Open

dwmblocks hangs on sb-forecast/sb-moonphase #1295

ssnailed opened this issue Mar 31, 2023 · 3 comments · May be fixed by #1296

Comments

@ssnailed
Copy link
Contributor

Currently when dwmblocks starts, it will hang on sb-forecast/sb-moonphase if wttr.in is slow to respond. The easy solution to this is to just introduce a timeout by using the -m or --connect-timeout flags for curl. Alternatively, you could have sb-forecast immediately return but have it start a background process to fetch the weather. This sub-process would then have to send a signal to dwmblocks once the weather is fetched. This would considerably improve the start time of dwmblocks for people with chronically slow internet connections and would prevent dwmblocks from hanging on startup.

Is this a change that would make sense? I would be happy to contribute this if this is something you are interested in.

@ssnailed ssnailed changed the title Backgrounding sb-forecast/sb-moonphase dwmblocks hangs on sb-forecast/sb-moonphase Mar 31, 2023
@LukeSmithxyz
Copy link
Owner

If you can implement the backgrounding elegantly, I think that would be a good idea. I've started to add -m to a lot of these curl-based modules for that reason, but yes, that would be a more principled solution.

@appeasementPolitik
Copy link
Contributor

Hey, I'm currently working on adding this as this is also a feature I would like to see. So far I'm having good results so I'll make a pull request in a little while

@ssnailed
Copy link
Contributor Author

ssnailed commented Apr 2, 2023

Perfect, I haven't had any time to work on it yet

@appeasementPolitik appeasementPolitik linked a pull request Apr 2, 2023 that will close this issue
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 a pull request may close this issue.

3 participants