diff --git a/client/src/nv_ingest_client/client/interface.py b/client/src/nv_ingest_client/client/interface.py index 8846ffd3..d503beee 100644 --- a/client/src/nv_ingest_client/client/interface.py +++ b/client/src/nv_ingest_client/client/interface.py @@ -293,13 +293,12 @@ def _done_callback(future): for future in future_to_job_id: future.add_done_callback(_done_callback) - results = combined_future.result() if self._vdb_bulk_upload: - self._vdb_bulk_upload.run(results) + self._vdb_bulk_upload.run(combined_future.result()) # only upload as part of jobs user specified this action self._vdb_bulk_upload = None - return results + return combined_future @ensure_job_specs def _prepare_ingest_run(self): diff --git a/tests/nv_ingest_client/client/test_interface.py b/tests/nv_ingest_client/client/test_interface.py index e6c8721c..fc1f1780 100644 --- a/tests/nv_ingest_client/client/test_interface.py +++ b/tests/nv_ingest_client/client/test_interface.py @@ -262,7 +262,7 @@ def test_ingest_async(ingestor, mock_client): ["result_1"] if job_id == "job_id_1" else ["result_2"] ) - combined_result = ingestor.ingest_async(timeout=15) + combined_result = ingestor.ingest_async(timeout=15).result() assert combined_result == ["result_1", "result_2"]