1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 05:25:29 +03:00

Removing old unneeded output and fixing comments

This commit is contained in:
John Westcott IV 2020-03-25 14:48:09 -04:00 committed by beeankha
parent f6bfdef34d
commit 61287f6b36

View File

@ -94,7 +94,6 @@ status:
from ..module_utils.tower_api import TowerModule from ..module_utils.tower_api import TowerModule
import time import time
import itertools
def check_job(module, job_url): def check_job(module, job_url):
@ -141,15 +140,16 @@ def main():
job_url = job['url'] job_url = job['url']
# This comes from tower_cli/models/base.py from the old tower-cli # This comes from tower_cli/models/base.py from the old tower-cli
dots = itertools.cycle([0, 1, 2, 3])
interval = min_interval interval = min_interval
start = time.time() start = time.time()
# Poll the Ansible Tower instance for status, and print the status to the outfile (usually standard out). # Get the initial job status from Tower, this will exit if there are any issues
result = check_job(module, job_url) result = check_job(module, job_url)
last_poll = time.time() last_poll = time.time()
timeout_check = 0 timeout_check = 0
# Loop while the job is not yet completed
while not result['finished']: while not result['finished']:
# Sanity check: Have we officially timed out? # Sanity check: Have we officially timed out?
# The timeout check is incremented below, so this is checking to see if we were timed out as of # The timeout check is incremented below, so this is checking to see if we were timed out as of
@ -158,9 +158,6 @@ def main():
module.json_output['msg'] = "Monitoring aborted due to timeout" module.json_output['msg'] = "Monitoring aborted due to timeout"
module.fail_json(**module.json_output) module.fail_json(**module.json_output)
# If the outfile is a TTY, print the current status.
output = '\rCurrent status: %s%s' % (result['status'], '.' * next(dots))
# Put the process to sleep briefly. # Put the process to sleep briefly.
time.sleep(0.2) time.sleep(0.2)