sns_topic: Retry on Topic 'NotFound' Exceptions when attempting to list subscriptions (#67089)

* sns_topic: Retry on Topic 'NotFound' Exceptions when attempting to list subscriptions

* add changelog
pull/67134/head
Mark Chappell 5 years ago committed by GitHub
parent 2f77a6f1f0
commit 50eb2f6957
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
minor_changes:
- sns_topic - Add backoff when we get Topic ``NotFound`` exceptions while listing the subscriptions.

@ -264,12 +264,12 @@ class SnsTopicManager(object):
paginator = self.connection.get_paginator('list_topics')
return paginator.paginate().build_full_result()['Topics']
@AWSRetry.jittered_backoff()
@AWSRetry.jittered_backoff(catch_extra_error_codes=['NotFound'])
def _list_topic_subscriptions_with_backoff(self):
paginator = self.connection.get_paginator('list_subscriptions_by_topic')
return paginator.paginate(TopicArn=self.topic_arn).build_full_result()['Subscriptions']
@AWSRetry.jittered_backoff()
@AWSRetry.jittered_backoff(catch_extra_error_codes=['NotFound'])
def _list_subscriptions_with_backoff(self):
paginator = self.connection.get_paginator('list_subscriptions')
return paginator.paginate().build_full_result()['Subscriptions']

Loading…
Cancel
Save