Fixed up async and polling logic.

This commit is contained in:
Michael DeHaan 2012-03-11 19:27:43 -04:00
commit 49a636d8a0
4 changed files with 89 additions and 24 deletions

View file

@ -177,9 +177,9 @@ def path_dwim(basedir, given):
def async_poll_status(runner, clock, poll_interval, ok, host, jid, result):
if ok and 'finished' in result:
print "<job %s> finished on %s, %s" % (jid, host, result)
print "<job %s> finished on %s" % (jid, host)
elif not ok or 'failed' in result:
print "<job %s> FAILED on %s, %s" % (jid, host, result)
print "<job %s> FAILED on %s" % (jid, host)
else:
print "<job %s> polling on %s, %s remaining" % (jid, host, clock)