Skip to content

Conversation

@grst
Copy link
Contributor

@grst grst commented Dec 22, 2025

Found myself restarting a job too often because a random site didn't respond on time

@grst grst requested a review from flying-sheep December 22, 2025 14:55
Copy link
Member

@flying-sheep flying-sheep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you adding all this code instead of using something pre-made?

https://will-ockmore.github.io/httpx-retries/

also we should just reuse a session instead of always touching every single place we use httpx every time we change something, right?

@grst
Copy link
Contributor Author

grst commented Dec 22, 2025

It was simple enough that I didn't bother searching.
But this looks neat, I'll use that instead.

@flying-sheep
Copy link
Member

You have a stronger stomach than I do if you consider anything HTTP related simple.

There are always so many edge cases that I just want to play lego with blocks built by people who really understand all the layers and pieces instead of rolling my own.

@grst
Copy link
Contributor Author

grst commented Dec 22, 2025

That's fair, but the worst thing that can happen here is a CI job failing

@flying-sheep
Copy link
Member

Of course! Still, less complexity to maintain is good, right?

@flying-sheep flying-sheep merged commit fe777ce into main Dec 23, 2025
3 checks passed
@flying-sheep flying-sheep deleted the retry-with-backoff branch December 23, 2025 08:24
@flying-sheep
Copy link
Member

Great, thank you! I just moved all the repeated timeoff and follow_redirect parameters into the client creation, and now this looks better than before with more functionality!

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.

3 participants