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

Added timeout in error handling #1636

Merged
merged 5 commits into from
Aug 15, 2018
Merged

Added timeout in error handling #1636

merged 5 commits into from
Aug 15, 2018

Conversation

anguillanneuf
Copy link
Member

Highlights the timeout feature - if not specified, Pub/Sub will try to publish or subscribe indefinitely.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 15, 2018
@@ -131,7 +131,9 @@ def publish_messages_with_error_handler(project, topic_name):
topic_path = publisher.topic_path(project, topic_name)

def callback(message_future):
if message_future.exception():
# Attempts to publish for 10 seconds, then times out.
# Defaults to None.
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the behavior when timeout is None?

This comment should be more specific. Something like: When timeout is unspecified or None, the exception method waits indefinitely.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's much better. Let me rewrite it.

@anguillanneuf anguillanneuf merged commit b4619bf into master Aug 15, 2018
@anguillanneuf anguillanneuf deleted the pubsub branch August 15, 2018 23:00
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