mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-10-10 20:00:57 +08:00
Merge pull request #26 from Novartis/feature/25
#25 added CELLXGENE_ARGS environment variable
This commit is contained in:
@@ -13,6 +13,7 @@ import socket
|
||||
|
||||
cellxgene_location = os.environ.get("CELLXGENE_LOCATION")
|
||||
cellxgene_data = os.environ.get("CELLXGENE_DATA")
|
||||
cellxgene_args = os.environ.get("CELLXGENE_ARGS", None)
|
||||
gateway_port = int(os.environ.get("GATEWAY_PORT", "5005"))
|
||||
external_host = os.environ.get(
|
||||
"EXTERNAL_HOST",
|
||||
@@ -50,6 +51,7 @@ optional_env_vars = {
|
||||
"GATEWAY_ENABLE_UPLOAD": enable_upload,
|
||||
"GATEWAY_ENABLE_ANNOTATIONS": enable_annotations,
|
||||
"GATEWAY_ENABLE_BACKED_MODE": enable_backed_mode,
|
||||
"CELLXGENE_ARGS": cellxgene_args,
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,11 @@ import logging
|
||||
import subprocess
|
||||
|
||||
from flask_api import status
|
||||
from cellxgene_gateway.env import enable_annotations, enable_backed_mode
|
||||
from cellxgene_gateway.env import (
|
||||
enable_annotations,
|
||||
enable_backed_mode,
|
||||
cellxgene_args,
|
||||
)
|
||||
from cellxgene_gateway.process_exception import ProcessException
|
||||
from cellxgene_gateway.dir_util import make_annotations
|
||||
from cellxgene_gateway.path_util import get_file_path, get_annotation_file_path
|
||||
@@ -35,6 +39,9 @@ class SubprocessBackend:
|
||||
extra_args = " --disable-annotations"
|
||||
if enable_backed_mode:
|
||||
extra_args += " --backed"
|
||||
if not cellxgene_args is None:
|
||||
extra_args += f" {cellxgene_args}"
|
||||
|
||||
cmd = (
|
||||
f"yes | {cellxgene_loc} launch {file_path}"
|
||||
+ " --port "
|
||||
|
||||
Reference in New Issue
Block a user