Skip to content

Commit

Permalink
feat(index): add waitTask method for taskID with requestOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
julienbourdeau committed Jan 12, 2018
1 parent 665d3c6 commit 1f1a64e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions algoliasearch-common/src/main/java/com/algolia/search/Index.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,19 @@ default void waitTask(@Nonnull Long taskID) throws AlgoliaException {
waitTask(task);
}

/**
* Wait for the completion of a task, for 100ms
*
* @param taskID ID of the task to wait for
* @param requestOptions Options to pass to this request
* @throws AlgoliaException
*/
default void waitTask(@Nonnull Long taskID, @Nonnull RequestOptions requestOptions)
throws AlgoliaException {
Task task = new Task().setAPIClient(getApiClient()).setIndex(getName()).setTaskID(taskID);
waitTask(task, requestOptions);
}

/**
* Wait for the completion of a task, for 100ms
*
Expand Down

0 comments on commit 1f1a64e

Please sign in to comment.