Skip to content

Commit 17125e2

Browse files
committed
Only pass --xcube-viewer-api-url in server mode
If running a container in batch mode, this argument is superfluous.
1 parent d9b62f7 commit 17125e2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

xcengine/core.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,16 @@ def run(
370370
command = (
371371
["python", "execute.py"]
372372
+ (["--batch"] if run_batch else [])
373-
+ (["--server"] if host_port is not None else [])
373+
+ (
374+
[
375+
"--server",
376+
"--xcube-viewer-api-url",
377+
f"http://localhost:{host_port}",
378+
]
379+
if host_port is not None
380+
else []
381+
)
374382
+ (["--from-saved"] if from_saved else [])
375-
+ (["--xcube-viewer-api-url", f"http://localhost:{host_port}"])
376383
)
377384
run_args = dict(
378385
image=self.image, command=command, remove=False, detach=True

0 commit comments

Comments
 (0)