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

small change

parent 61abfde6
No related branches found
No related tags found
1 merge request!147Enabling retry for indexer to storage service calls
Pipeline #43659 failed
...@@ -41,7 +41,7 @@ public class RetryPolicy { ...@@ -41,7 +41,7 @@ public class RetryPolicy {
private int attempts = 3; private int attempts = 3;
private int waitDuration = 1000; private int waitDuration = 1000;
private String recordNotFound = "notFound"; private final String RECORD_NOT_FOUND = "notFound";
/** /**
* @return RetryConfig with 3 attempts and 1 sec wait time * @return RetryConfig with 3 attempts and 1 sec wait time
...@@ -64,7 +64,7 @@ public class RetryPolicy { ...@@ -64,7 +64,7 @@ public class RetryPolicy {
return false; return false;
} }
JsonObject jsonObject = new JsonParser().parse(response.getBody()).getAsJsonObject(); JsonObject jsonObject = new JsonParser().parse(response.getBody()).getAsJsonObject();
JsonElement notFoundElement = (JsonArray) jsonObject.get(recordNotFound); JsonElement notFoundElement = (JsonArray) jsonObject.get(RECORD_NOT_FOUND);
if (notFoundElement == null || if (notFoundElement == null ||
!notFoundElement.isJsonArray() || !notFoundElement.isJsonArray() ||
notFoundElement.getAsJsonArray().size() == 0 || notFoundElement.getAsJsonArray().size() == 0 ||
......
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