Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use exponential backoff in HTTP methods. #1279

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

Merged
merged 2 commits into from
Dec 15, 2017
Merged

Use exponential backoff in HTTP methods. #1279

merged 2 commits into from
Dec 15, 2017

Conversation

gguuss
Copy link
Contributor

@gguuss gguuss commented Dec 15, 2017

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 15, 2017
@@ -27,11 +27,13 @@
import json
import time

from google.api_core import retry
Copy link
Contributor

Choose a reason for hiding this comment

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

this can go in the same section as jwt and requests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, ty!

@@ -83,9 +88,16 @@ def publish_message(
resp = requests.post(
publish_url, data=json.dumps(body), headers=headers)

if (resp.status_code != 200):
Copy link
Contributor

Choose a reason for hiding this comment

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

If you wanted, you could use resp.raise_for_status(), but this is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack.

@theacodes theacodes merged commit c3f20cd into master Dec 15, 2017
@theacodes theacodes deleted the iot-backoff branch December 15, 2017 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants