Created
December 9, 2014 15:57
-
-
Save nelsnelson/4db0f643411c6f130d02 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def wait_for_devstack_gate_to_finish(server): | |
limit = time.time() + 30000 | |
try: | |
while time.time() < limit: | |
time.sleep(20) | |
result = '' | |
try: | |
result = remote(server, user='jenkins', command='[[ -f /tmp/gate-finished ]] && echo done') | |
except Exception as ex: | |
log.error("Error waiting for devstack-gate to finish: {}".format(ex.message)) | |
if len(result) > 0: | |
return | |
log.warning('Timed out waiting for /tmp/gate-finished') | |
except KeyboardInterrupt as ex: | |
print "\nInterrupted" | |
sys.exit(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment