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:
commit
eec05eac3c
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user