Merge branch 'master' into dependabot/pip/bleach-3.1.2
This commit is contained in:
commit
c4b1277d3e
|
@ -332,7 +332,7 @@ def clean_all_sources():
|
||||||
metrics.send(f"{function}.success", 'counter', 1)
|
metrics.send(f"{function}.success", 'counter', 1)
|
||||||
|
|
||||||
|
|
||||||
@celery.task(soft_time_limit=600)
|
@celery.task(soft_time_limit=3600)
|
||||||
def clean_source(source):
|
def clean_source(source):
|
||||||
"""
|
"""
|
||||||
This celery task will clean the specified source. This is a destructive operation that will delete unused
|
This celery task will clean the specified source. This is a destructive operation that will delete unused
|
||||||
|
|
|
@ -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