diff --git a/Dockerfile b/Dockerfile index 255f143..ab1fd4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,4 +32,4 @@ RUN ["bugsink-manage", "migrate", "snappea", "--database=snappea"] EXPOSE 8000 -CMD [ "bugsink-server-unified", "bugsink-manage", "check", "--deploy", "--fail-level", "WARNING", "AMP_AMP", "gunicorn", "--bind=0.0.0.0:8000", "--workers=10", "--access-logfile", "-", "bugsink.wsgi", "UNIFIED_WITH", "bugsink-runsnappea"] +CMD [ "bugsink-server-unified", "bugsink-manage", "check", "--deploy", "--fail-level", "WARNING", "&&", "gunicorn", "--bind=0.0.0.0:8000", "--workers=10", "--access-logfile", "-", "bugsink.wsgi", "|||", "bugsink-runsnappea"] diff --git a/bugsink/scripts/server_unified.py b/bugsink/scripts/server_unified.py index fe58640..7bd1c2d 100644 --- a/bugsink/scripts/server_unified.py +++ b/bugsink/scripts/server_unified.py @@ -83,7 +83,7 @@ class ParentProcess: @classmethod def get_pre_start_command_args(self, argv): - """Splits our own arguments into a list of args for each of the pre-start commands, we split on "AMP_AMP".""" + """Splits our own arguments into a list of args for each of the pre-start commands, we split on "&&".""" # We don't want to pass the first argument, as that is the script name args = argv[1:] @@ -91,8 +91,8 @@ class ParentProcess: result = [] this = [] for arg in args: - if arg == "AMP_AMP": - # AMP_AMP serves as a terminator here, i.e. we only add-to-result when we encounter it, the last bit + if arg == "&&": + # && serves as a terminator here, i.e. we only add-to-result when we encounter it, the last bit # is never addeded (it will be dealt with as the set of parallel commands) result.append(this) this = [] @@ -103,17 +103,17 @@ class ParentProcess: @classmethod def get_parallel_command_args(self, argv): - """Splits our own arguments into a list of args for each of the children each, we split on "UNIFIED_WITH".""" + """Splits our own arguments into a list of args for each of the children each, we split on "|||".""" # We don't want to pass the first argument, as that is the script name args = argv[1:] - while "AMP_AMP" in args: - args = args[args.index("AMP_AMP") + 1:] + while "&&" in args: + args = args[args.index("&&") + 1:] result = [[]] for arg in args: - if arg == "UNIFIED_WITH": + if arg == "|||": result.append([]) else: result[-1].append(arg) diff --git a/bugsink/tests.py b/bugsink/tests.py index 24a3281..f485aeb 100644 --- a/bugsink/tests.py +++ b/bugsink/tests.py @@ -157,32 +157,31 @@ class ServerUnifiedTestCase(RegularTestCase): ) _check( - ["script.py", "a", "b", "UNIFIED_WITH", "c", "d", "UNIFIED_WITH", "e", "f"], + ["script.py", "a", "b", "|||", "c", "d", "|||", "e", "f"], [], [["a", "b"], ["c", "d"], ["e", "f"]], ) _check( - ["script.py", "a", "b", "AMP_AMP", "c", "d", "UNIFIED_WITH", "e", "f"], + ["script.py", "a", "b", "&&", "c", "d", "|||", "e", "f"], [["a", "b"]], [["c", "d"], ["e", "f"]], ) _check( - ["script.py", "a", "b", "UNIFIED_WITH", "c", "d", "UNIFIED_WITH", "e", "f"], + ["script.py", "a", "b", "|||", "c", "d", "|||", "e", "f"], [], [["a", "b"], ["c", "d"], ["e", "f"]], ) _check( - ["script.py", "a", "b", "AMP_AMP", "c", "d", "AMP_AMP", "e", "f"], + ["script.py", "a", "b", "&&", "c", "d", "&&", "e", "f"], [["a", "b"], ["c", "d"]], [["e", "f"]], ) _check( - ["script.py", "a", "b", "AMP_AMP", "c", "d", "AMP_AMP", - "e", "f", "UNIFIED_WITH", "g", "h", "UNIFIED_WITH", "i", "j"], + ["script.py", "a", "b", "&&", "c", "d", "&&", "e", "f", "|||", "g", "h", "|||", "i", "j"], [["a", "b"], ["c", "d"]], [["e", "f"], ["g", "h"], ["i", "j"]], )