Add polling logic in runner such that all actions get kicked off everywhere then polling
happens only on needed hosts, allowing some hosts to fail and drop out of the running.
This commit is contained in:
parent
1e694d464f
commit
93824ff54e
1 changed files with 3 additions and 2 deletions
|
@ -81,12 +81,13 @@ if mode == 'cleanup':
|
|||
data = file(log_path).read()
|
||||
try:
|
||||
data = json.loads(data)
|
||||
except:
|
||||
except Exception, e:
|
||||
if data == '':
|
||||
# file not written yet? That means it is running
|
||||
print json.dumps({
|
||||
"results_file" : log_path,
|
||||
"ansible_job_id" : jid,
|
||||
"traceback" : str(e),
|
||||
"started" : 1,
|
||||
})
|
||||
else:
|
||||
|
@ -96,7 +97,7 @@ except:
|
|||
"results_file" : log_path,
|
||||
"msg" : "Could not parse job output: %s" % data,
|
||||
})
|
||||
sys.exit(1)
|
||||
sys.exit(0)
|
||||
|
||||
if not data.has_key("started"):
|
||||
data['finished'] = 1
|
||||
|
|
Loading…
Reference in a new issue