No need to retry 25 times on DeleteConflict errors
This commit is contained in:
parent
0c02ddec3c
commit
d825616ea6
|
@ -24,6 +24,12 @@ def retry_throttled(exception):
|
||||||
if exception.response["Error"]["Code"] == "NoSuchEntity":
|
if exception.response["Error"]["Code"] == "NoSuchEntity":
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
# No need to retry deletion requests if there is a DeleteConflict error.
|
||||||
|
# This error indicates that the certificate is still attached to an entity
|
||||||
|
# and cannot be deleted.
|
||||||
|
if exception.response["Error"]["Code"] == "DeleteConflict":
|
||||||
|
return False
|
||||||
|
|
||||||
metrics.send("iam_retry", "counter", 1, metric_tags={"exception": str(exception)})
|
metrics.send("iam_retry", "counter", 1, metric_tags={"exception": str(exception)})
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue