Skip to content

Commit

Permalink
async results reverted to future (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
jperez999 authored Feb 21, 2025
1 parent 2680b2e commit 63654e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions client/src/nv_ingest_client/client/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tests/nv_ingest_client/client/test_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]


Expand Down

0 comments on commit 63654e3

Please sign in to comment.