From 6aa2ef3827f8f72306ea7cd3fec0b27474a4fc02 Mon Sep 17 00:00:00 2001 From: Dmitry Shulyak Date: Tue, 13 Oct 2015 14:14:52 +0300 Subject: [PATCH] Sleep only in case if some tasks are not finished --- solar/solar/cli/orch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solar/solar/cli/orch.py b/solar/solar/cli/orch.py index 58cd5a2d..7e96f56f 100755 --- a/solar/solar/cli/orch.py +++ b/solar/solar/cli/orch.py @@ -64,7 +64,7 @@ def wait_report(uid, timeout, interval=3): length = len(stringified_summary) click.echo(stringified_summary, nl=False) sys.stdout.flush() - if summary[states.PENDING.name] + summary[states.INPROGRESS.name] == 0: + if summary[states.PENDING.name] + summary[states.INPROGRESS.name] != 0: time.sleep(interval) except errors.SolarError as err: click.echo('')