mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
updated to error if finished not in result
This commit is contained in:
@@ -594,6 +594,10 @@ class TowerAPIModule(TowerModule):
|
|||||||
# Grab our start time to compare against for the timeout
|
# Grab our start time to compare against for the timeout
|
||||||
start = time.time()
|
start = time.time()
|
||||||
result = self.get_endpoint(url)
|
result = self.get_endpoint(url)
|
||||||
|
if result['json']['finished'] is None:
|
||||||
|
self.json_output['msg'] = 'Monitoring of {0} "{1}" aborted due to timeout'.format(object_type, object_name)
|
||||||
|
self.fail_json(**self.json_output)
|
||||||
|
else:
|
||||||
while not result['json']['finished']:
|
while not result['json']['finished']:
|
||||||
# If we are past our time out fail with a message
|
# If we are past our time out fail with a message
|
||||||
if timeout and timeout < time.time() - start:
|
if timeout and timeout < time.time() - start:
|
||||||
|
|||||||
Reference in New Issue
Block a user