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

fix: Add timeout to retrieve_latest_base_ami.py #19

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

dianakhuang
Copy link
Member

We were seeing some connections hang. This ensures that we can kill misbehaving attempts and then retry them.

edx/edx-arch-experiments#886

We were seeing some connections hang. This ensures that
we can kill misbehaving attempts and then retry them.
@@ -127,7 +127,8 @@ def _backoff_logger(details):
max_tries=5, jitter=backoff.random_jitter, on_backoff=_backoff_logger,
)
def get_with_retry(url):
data = requests.get(url)
# Set timeout to 1 minute to ensure open connections get killed.
Copy link

Choose a reason for hiding this comment

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

I don't think the comment is needed, but it won't hurt (until someone changes the timeout and forgets to change the comment. 😉 )

Copy link
Member Author

Choose a reason for hiding this comment

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

🙏 we delete this code before then.

@dianakhuang dianakhuang merged commit e679a5b into master Jan 7, 2025
3 checks passed
@dianakhuang dianakhuang deleted the diana/add-timeout branch January 7, 2025 16:28
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