fix: increase timeout_keep_alive and allow parameter changes (#98)

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
Michele Dolfi
2025-03-16 09:03:40 +01:00
committed by GitHub
parent a212547d28
commit 07c48edd5d
2 changed files with 10 additions and 0 deletions

View File

@@ -135,6 +135,7 @@ def _run(
workers=uvicorn_settings.workers,
root_path=uvicorn_settings.root_path,
proxy_headers=uvicorn_settings.proxy_headers,
timeout_keep_alive=uvicorn_settings.timeout_keep_alive,
)
@@ -186,6 +187,9 @@ def dev(
)
),
] = uvicorn_settings.proxy_headers,
timeout_keep_alive: Annotated[
int, typer.Option(help="Timeout for the server response.")
] = uvicorn_settings.timeout_keep_alive,
# docling options
artifacts_path: Annotated[
Optional[Path],
@@ -213,6 +217,7 @@ def dev(
uvicorn_settings.reload = reload
uvicorn_settings.root_path = root_path
uvicorn_settings.proxy_headers = proxy_headers
uvicorn_settings.timeout_keep_alive = timeout_keep_alive
_run(
command="dev",
@@ -277,6 +282,9 @@ def run(
)
),
] = uvicorn_settings.proxy_headers,
timeout_keep_alive: Annotated[
int, typer.Option(help="Timeout for the server response.")
] = uvicorn_settings.timeout_keep_alive,
# docling options
artifacts_path: Annotated[
Optional[Path],
@@ -307,6 +315,7 @@ def run(
uvicorn_settings.workers = workers
uvicorn_settings.root_path = root_path
uvicorn_settings.proxy_headers = proxy_headers
uvicorn_settings.timeout_keep_alive = timeout_keep_alive
_run(
command="run",