提交 72f227db 编写于 作者: C Cleber Rosa 提交者: Lucas Meneghel Rodrigues

UI progress: set a 1 second cycle for a complete throbber iteration

That is, within a second, if the test process is running, the user
will see a "full cycle" of the throbber.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 00b5b31f
......@@ -176,6 +176,8 @@ class TestRunner(object):
args=(params, q,))
cycle_timeout = 0.01
ui_progress_cycle = 0.25
ui_progress_count = 0
time_started = time.time()
should_quit = False
test_state = None
......@@ -200,7 +202,10 @@ class TestRunner(object):
test_state = q.get(timeout=cycle_timeout)
except Queue.Empty:
if p.is_alive():
ui_progress_count += cycle_timeout
if ui_progress_count >= ui_progress_cycle:
self.job.result_proxy.throbber_progress()
ui_progress_count = 0
else:
should_quit = True
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册