-
Notifications
You must be signed in to change notification settings - Fork 67
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: make nested retry blocks work for RPC calls #589
Conversation
@andrewsg this is weird, if I run lint locally it passes, but Kokoro says it failed. |
Looks like a transient error, let's run it again and cross fingers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work here!
google/cloud/ndb/context.py
Outdated
@@ -544,6 +546,12 @@ def policy(key): | |||
|
|||
set_memcache_timeout_policy = set_global_cache_timeout_policy | |||
|
|||
def set_retry_state(self, state): | |||
self.retry = state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This instance variable is only accessed through setters and getters, so let's indicate it's private, like self._retry
@andrewsg I believe this is a better approach than the original work. This removes the need for the datastore API having to know about the retry state, thus making nested retries work for other use cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
fixes #567