def await_build_ready(self, timeout=5000):
"""
Wait a specific amount of `timeout` for the blueprint build status
to return no errors. The waiting polling interval is fixed at 1sec.
Args:
timeout (int): timeout to wait in milliseconds
Returns:
True: when the blueprint contains to build errors
False: when the blueprint contains build errors, even after waiting `timeout`
"""
@retrying.retry(wait_fixed=1000, stop_max_delay=timeout)
def wait_for_no_errors():
assert not self.build_errors
# noinspection PyBroadException
try:
wait_for_no_errors()
except:
return False
return True
评论列表
文章目录