Skip to content

Commit

Permalink
Merge #734
Browse files Browse the repository at this point in the history
734: fix WaitForTask timeout in case of a task cancellation r=curquiza a=the-sinner

# Pull Request

## Related issue
Fixes #725

## What does this PR do?
- fix WaitForTask timeout in case of a task cancellation

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: Shalabh Agarwal <[email protected]>
  • Loading branch information
meili-bors[bot] and the-sinner authored May 23, 2024
2 parents 3edd5b9 + 05017a1 commit 4449ba6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/meilisearch/sdk/TasksHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void waitForTask(int taskUid, int timeoutInMs, int intervalInMs) throws Meilisea
long elapsedTime = 0;

while (status == null
|| (!status.equals(TaskStatus.SUCCEEDED) && !status.equals(TaskStatus.FAILED))) {
|| (status.equals(TaskStatus.ENQUEUED) || status.equals(TaskStatus.PROCESSING))) {
if (elapsedTime >= timeoutInMs) {
throw new MeilisearchTimeoutException();
}
Expand Down

0 comments on commit 4449ba6

Please sign in to comment.