Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(start-stack): adapt docs of --max_file_size flag (DEV_3093) #689

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ If you don't know what that means, just type `y` ("yes") and then `Enter`.

The following options are available:

- `--max_file_size=int` (optional, default: `250`): max. multimedia file size allowed by SIPI, in MB (max: 100'000)
- `--max_file_size=int` (optional, default: `2000`): max. multimedia file size allowed by SIPI, in MB (max: 100'000)
- `--latest` (optional):
instead of the latest deployed version,
use the latest development version of DSP-API (from the `main` branch)
Expand Down
2 changes: 1 addition & 1 deletion src/dsp_tools/cli/create_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def _add_start_stack(subparsers: _SubParsersAction[ArgumentParser]) -> None:
subparser.add_argument(
"--max_file_size",
type=int,
help="max. multimedia file size allowed by SIPI, in MB (default: 250, max: 100'000)",
help="max. multimedia file size allowed by SIPI, in MB (default: 2000, max: 100'000)",
)
subparser.add_argument("--prune", action="store_true", help="execute 'docker system prune' without asking")
subparser.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion src/dsp_tools/commands/start_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def _get_sipi_docker_config_lua(self) -> None:
)
docker_config_lua_text = docker_config_lua_response.text
if self.__stack_configuration.max_file_size:
max_post_size_regex = r"max_post_size ?= ?[\'\"]\d+M[\'\"]"
max_post_size_regex = r"max_post_size ?= ?[\'\"]?\d+[MG][\'\"]?"
if not regex.search(max_post_size_regex, docker_config_lua_text):
raise UserError("Unable to set max_file_size. Please try again without this flag.")
docker_config_lua_text = regex.sub(
Expand Down