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

Add SubscriberClient.close() to examples #2959

Closed
wants to merge 2 commits into from

Conversation

pradn
Copy link
Contributor

@pradn pradn commented Feb 21, 2020

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 21, 2020
Copy link
Member

@anguillanneuf anguillanneuf left a comment

Choose a reason for hiding this comment

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

Thank you for the updates! I have always wondered why we have this method but never seem to use it anywhere. LGTM once all tests pass.

@pradn
Copy link
Contributor Author

pradn commented Feb 22, 2020

The close() method was only recently added. Perhaps you're thinking of something else?

googleapis/python-pubsub@b58d0d8

@anguillanneuf
Copy link
Member

anguillanneuf commented Feb 22, 2020

Copy link
Member

@anguillanneuf anguillanneuf left a comment

Choose a reason for hiding this comment

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

Please fix the tests.

except: # noqa
streaming_pull_future.cancel()
# Wrap subscriber in a 'with' block to automatically call close() when done.
with subscriber:
Copy link
Member

@anguillanneuf anguillanneuf Feb 24, 2020

Choose a reason for hiding this comment

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

This should be with client.

Copy link
Member

@anguillanneuf anguillanneuf left a comment

Choose a reason for hiding this comment

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

The library version looks outdated in requirements.txt.

@anguillanneuf
Copy link
Member

@pradn This branch has conflicts that must be resolved. I'm closing your PR and will work on a new one.

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.

5 participants