Closed hacktobeer closed 5 months ago
FWIW, I tried
from google.api_core.timeout import ConstantTimeout
# ...
self.publisher.create_topic(self.topic_path, timeout=ConstantTimeout(timeout=10))
And that didn't change the behavior
What's the use-case or steps to reproduce this here? Is this when revoking, re-auth'ing and then re-running turbiniactl
?
Do a request and fetch the results with the wait option, go to another terminal and revoke the gcloud credentials, which makes the turbinia client hang. It would be nice to see if it's possible to do some error checking in the wait function or be able to set a timeout.
Closing this since the old client is deprecated.
When revoking GCP credentials ($ gcloud auth revoke) the client library hang for 600 seconds trying to call the create_topic() code below: https://github.com/google/turbinia/blob/master/turbinia/pubsub.py#L68
Should we set a retry and timeout object when creating the PublisherClient to minimise the time the user has to wait? https://googleapis.dev/python/pubsub/latest/UPGRADING.html#custom-retry-and-timeout-settings-for-publisher-client