mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
Redo waiting until Project updates are complete
This commit is contained in:
parent
86afa5cf42
commit
a531b85b31
@ -195,9 +195,14 @@ class ApiV2(base.Base):
|
||||
# We should only impose a default password if the resource doesn't exist.
|
||||
post_data.setdefault('password', 'abc123')
|
||||
_page = endpoint.post(post_data)
|
||||
if asset['natural_key']['type'] == 'project':
|
||||
# When creating a project, we need to wait for its
|
||||
# first project update to finish so that associated
|
||||
# JTs have valid options for playbook names
|
||||
_page.wait_until_completed()
|
||||
else:
|
||||
_page = _page.put(post_data)
|
||||
except exc.Common as e:
|
||||
except (exc.Common, AssertionError) as e:
|
||||
log.error("Object import failed: %s.", e)
|
||||
log.debug("post_data: %r", post_data)
|
||||
continue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user