Skip to content
Snippets Groups Projects
Commit 9f6bcb57 authored by Muskan Srivastava's avatar Muskan Srivastava
Browse files

log in retry

parent 0ade1698
No related branches found
No related tags found
1 merge request!147Enabling retry for indexer to storage service calls
Pipeline #42412 failed
......@@ -18,23 +18,12 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import io.github.resilience4j.retry.Retry;
import io.github.resilience4j.retry.RetryConfig;
import io.github.resilience4j.retry.RetryRegistry;
import lombok.extern.java.Log;
import org.opengroup.osdu.core.common.http.FetchServiceHttpRequest;
import org.opengroup.osdu.core.common.http.UrlFetchServiceImpl;
import org.opengroup.osdu.core.common.model.http.HttpResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import java.net.URISyntaxException;
import java.time.Duration;
import java.util.function.Supplier;
import static io.github.resilience4j.retry.RetryConfig.custom;
import static java.time.temporal.ChronoUnit.SECONDS;
/**
* This class handles retry configuration logic for calls made to <prefix>/storage/v2/query/records:batch
......@@ -76,7 +65,7 @@ public class RetryPolicy {
notFoundElement.getAsJsonArray().isJsonNull()) {
return false;
}
log.info("Retry is set true for 3 attempts");
log.info("Retry is set true");
return true;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment