Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public static void deleteByQuery(CloseableHttpClient httpClient, String esAddres
public static void waitForTaskToFinish(CloseableHttpClient httpClient, String esAddress, String taskId, MigrationContext migrationContext) throws IOException {
while (true) {
final JSONObject status = new JSONObject(
HttpUtils.executeGetRequest(httpClient, esAddress + "/_tasks/" + taskId + "?wait_for_completion=true&timeout=15s",
HttpUtils.executeGetRequest(httpClient, esAddress + "/_tasks/" + taskId,
null));
if (status.has("completed") && status.getBoolean("completed")) {
if (migrationContext != null) {
Expand All @@ -354,6 +354,11 @@ public static void waitForTaskToFinish(CloseableHttpClient httpClient, String es
} else {
LOGGER.info("Waiting for Task {} to complete", taskId);
}
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
}

Expand Down