From 2177413a1a81863b143cf159db25c8e0deba9a83 Mon Sep 17 00:00:00 2001 From: Ben Allen Date: Thu, 23 Feb 2023 18:01:22 -0500 Subject: [PATCH] Stop ./scripts/start once Malcolm has finished starting --- scripts/control.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/control.py b/scripts/control.py index 77643137b..44eefda62 100755 --- a/scripts/control.py +++ b/scripts/control.py @@ -460,6 +460,9 @@ def logs(): r'^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9]+)?(Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$' ) + finishedStartingRegEx = re.compile(r'.+Pipelines\s+running\s+\{.*:non_running_pipelines=>\[\]\}') + finishedStarting = False + # increase COMPOSE_HTTP_TIMEOUT to be ridiculously large so docker-compose never times out the TTY doing debug output osEnv = os.environ.copy() osEnv['COMPOSE_HTTP_TIMEOUT'] = '100000000' @@ -499,6 +502,8 @@ def logs(): outputStrEscaped = EscapeAnsi(outputStr) if ignoreRegEx.match(outputStrEscaped): pass ### print(f'!!!!!!!: {outputStr}') + elif finishedStartingRegEx.match(outputStrEscaped) and (args.cmdStart or args.cmdRestart): + finishedStarting = True else: serviceMatch = serviceRegEx.search(outputStrEscaped) serviceMatchFmt = serviceRegEx.search(outputStr) if coloramaImported else serviceMatch