From f6e27891c168a7d2832bc714ad86aab9483c9761 Mon Sep 17 00:00:00 2001 From: Nolan Tremelling <34580718+NolanTrem@users.noreply.github.com> Date: Tue, 22 Oct 2024 20:43:30 -0700 Subject: [PATCH] Nolan/await update files (#1461) * Ensure that we await ingest files in ingest_files method * Await update files as well --- py/cli/commands/ingestion.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/cli/commands/ingestion.py b/py/cli/commands/ingestion.py index 2ed63b5f1..9810f9ed8 100644 --- a/py/cli/commands/ingestion.py +++ b/py/cli/commands/ingestion.py @@ -109,7 +109,7 @@ async def ingest_files( "--run-without-orchestration", is_flag=True, help="Run with orchestration" ) @pass_context -def update_files( +async def update_files( ctx, file_paths, document_ids, metadatas, run_without_orchestration ): """Update existing files in R2R.""" @@ -129,7 +129,7 @@ def update_files( "Metadatas must be a JSON string representing a list of dictionaries or a single dictionary" ) run_with_orchestration = not run_without_orchestration - response = client.update_files( + response = await client.update_files( file_paths, document_ids, metadatas,