From 93824ff54e5af0398d4c4dc5b8a2677e74c47b7d Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sun, 11 Mar 2012 20:54:54 -0400 Subject: [PATCH] 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. --- async_status | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/async_status b/async_status index 839614ca929..8959ec97b19 100755 --- a/async_status +++ b/async_status @@ -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