Skip to content

Conversation

@ommistry2914
Copy link

@ommistry2914 ommistry2914 commented Oct 14, 2025

  • Add convenience helpers on IndexingJobsResources and AsyncIndexingJobsResource to poll an indexing job until it reaches a terminal state.

  • Method : wait_for_completion(uuid, timeout=300, poll_interval=2, raise_on_failure=True) (sync) and the same async signature on the async resource. They call retrieve() repeatedly, return the final IndexingJobRetrieveResponse on success, raise RuntimeError for failure/cancelled/error states when raise_on_failure=True , and raise TimeoutError if the timeout elapses. Removes the need for callers to write manual polling loops.

fixes #41

@bbatha
Copy link
Collaborator

bbatha commented Oct 22, 2025

Closing as a dupe of #49

@bbatha bbatha closed this Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a helper function to poll for knowledge base indexing completion

2 participants