diff options
Diffstat (limited to 'tradefed_cluster/util/pubsub_client.py')
-rw-r--r-- | tradefed_cluster/util/pubsub_client.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tradefed_cluster/util/pubsub_client.py b/tradefed_cluster/util/pubsub_client.py index 9dfd8f0..cc9a3a4 100644 --- a/tradefed_cluster/util/pubsub_client.py +++ b/tradefed_cluster/util/pubsub_client.py @@ -19,6 +19,7 @@ import threading from googleapiclient import discovery from googleapiclient import errors +from google3.pyglib import retry PUBSUB_API_SCOPES = ('https://www.googleapis.com/auth/pubsub') PUBSUB_API_NAME = 'pubsub' @@ -64,6 +65,8 @@ class PubSubClient(object): raise logging.debug('Topic %s already exists', topic) + @retry.logged_retry_on_exception( + retry_value=errors.HttpError, retry_intervals=[10, 20]) def PublishMessages(self, topic, messages): """Publish messages to supplied topic. |