1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 22:21:13 +03:00

Merge branch 'devel' into workflow-visualizer-search

This commit is contained in:
Daniel Sami 2018-10-19 10:33:51 -04:00 committed by GitHub
commit eec05eac3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -566,7 +566,7 @@ def update_host_smart_inventory_memberships():
@task()
def delete_inventory(inventory_id, user_id):
def delete_inventory(inventory_id, user_id, retries=5):
# Delete inventory as user
if user_id is None:
user = None
@ -591,7 +591,9 @@ def delete_inventory(inventory_id, user_id):
return
except DatabaseError:
logger.exception('Database error deleting inventory {}, but will retry.'.format(inventory_id))
# TODO: self.retry(countdown=10)
if retries > 0:
time.sleep(10)
delete_inventory(inventory_id, user_id, retries=retries - 1)
def with_path_cleanup(f):