Skip to content

Timeout added for opener #42

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

Closed
wants to merge 1 commit into from

Conversation

prabhakar267
Copy link

Fixes #20

@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Oct 24, 2017
@SendGridDX
Copy link

SendGridDX commented Oct 24, 2017

CLA assistant check
All committers have signed the CLA.

@thinkingserious
Copy link
Contributor

Thank you @prabhakar267!

Please add this parameter to the calling functions so that it can be configurable.

With Best Regards,

Elmer

@prabhakar267
Copy link
Author

@thinkingserious I have updated the parameter and all calling functions
Also, I had to update a unit test. 😄

@thinkingserious
Copy link
Contributor

@prabhakar267

We have not been able to merge your Pull Request, but because you are awesome - we wanted to make sure you could still get a SendGrid Hacktoberfest shirt.

Please go fill out our swag form before Nov 5th and we will send the shirt! (We know that you might have tried this before and it didn’t work, sorry about that!)

You have till Nov 5th to fill out this form in order to get the Hacktoberfest shirt!

Thank you for contributing during Hacktoberfest! We hope to see you in the repos soon! Just so you know, we always give away a SendGrid shirt for your first ever non-Hacktoberfest PR that gets merged.

@@ -143,18 +143,20 @@ def _build_client(self, name=None):
url_path=url_path,
append_slash=self.append_slash)

def _make_request(self, opener, request):
def _make_request(self, opener, request, timeout=4):
Copy link

Choose a reason for hiding this comment

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

This seems incomplete as I don't see a way to get a timeout value down into this call from the public api. It looks to me like the Client.getattr method's nested http_request should take a timeout parameter from the **kwargs and then pass that on to the call to self._make_request. You're hard coding a 4 second timeout here which isn't right - that should be up to the caller. The default timeout shouldn't be set to anything either to stay consistent with how every other api I've used handles timeouts.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great feedback @wynnw!

@prabhakar267 thoughts?

@thinkingserious thinkingserious added the type: community enhancement feature request not on Twilio's roadmap label Feb 27, 2018
@thinkingserious thinkingserious added status: duplicate duplicate issue and removed difficulty: medium fix is medium in difficulty hacktoberfest status: code review request requesting a community code review or review from Twilio type: community enhancement feature request not on Twilio's roadmap labels May 22, 2018
@thinkingserious
Copy link
Contributor

#21 (comment)

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

Successfully merging this pull request may close these issues.

5 participants