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

Sleeping and retrying for a long time #185

Open
valankar opened this issue Mar 8, 2024 · 1 comment
Open

Sleeping and retrying for a long time #185

valankar opened this issue Mar 8, 2024 · 1 comment

Comments

@valankar
Copy link

valankar commented Mar 8, 2024

I was getting some long hangs in my script and it boiled down to:

This is retrying a sleep in a loop for 250 times. I'm not sure why 250 was chosen, but could there be an option to disable this or provide a limit to the timeout?

I see there is a timeout option:

timeout: int, default 30, optional

but it doesn't seem to apply here?

@JECSand
Copy link
Owner

JECSand commented Mar 16, 2024

@valankar Tbh that was sort of a hack to work around the random errors yahoo finance was returning. When I implemented this, it was an effective way of brute forcing a response.

I'm waiting for Yahoo Finance to become more stable before I completely refactor this library. I suspect they are in the middle of a tech stack overhaul similar to 2017's.

If you have a more effective manner to handle this, I'll be more than happy to review and merge in a PR. I'm slammed with work and won't be able to really address anything on my end until April.

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

No branches or pull requests

2 participants