mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-09 08:58:11 +08:00
Fix a few bugs from server refactor (#1188)
- Fixes #1185 port command line argument was not handle correctly - Fixes #1184 was not catching the "DatasetAccessError" exception.
This commit is contained in:
@@ -12,6 +12,7 @@ import click
|
|||||||
|
|
||||||
from server.common.utils import custom_format_warning
|
from server.common.utils import custom_format_warning
|
||||||
from server.common.utils import find_available_port, is_port_available, sort_options
|
from server.common.utils import find_available_port, is_port_available, sort_options
|
||||||
|
from server.common.errors import DatasetAccessError
|
||||||
from server.data_common.matrix_loader import MatrixDataLoader, MatrixDataCacheManager
|
from server.data_common.matrix_loader import MatrixDataLoader, MatrixDataCacheManager
|
||||||
from server.common.annotations import AnnotationsLocalFile
|
from server.common.annotations import AnnotationsLocalFile
|
||||||
from server.common.app_config import AppConfig
|
from server.common.app_config import AppConfig
|
||||||
@@ -167,7 +168,7 @@ def server_args(func):
|
|||||||
"--port",
|
"--port",
|
||||||
"-p",
|
"-p",
|
||||||
metavar="<port>",
|
metavar="<port>",
|
||||||
default=DEFAULT_SERVER_PORT,
|
default=None,
|
||||||
show_default=True,
|
show_default=True,
|
||||||
help="Port to run server on. If not specified cellxgene will find an available port.",
|
help="Port to run server on. If not specified cellxgene will find an available port.",
|
||||||
)
|
)
|
||||||
@@ -313,7 +314,7 @@ def launch(
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
matrix_data_loader.pre_load_validation()
|
matrix_data_loader.pre_load_validation()
|
||||||
except RuntimeError as e:
|
except DatasetAccessError as e:
|
||||||
raise click.ClickException(str(e))
|
raise click.ClickException(str(e))
|
||||||
|
|
||||||
file_size = matrix_data_loader.file_size()
|
file_size = matrix_data_loader.file_size()
|
||||||
|
|||||||
Reference in New Issue
Block a user