Skip to content

Commit

Permalink
Incorporating parseIfExist method into ReindexStep class
Browse files Browse the repository at this point in the history
Signed-off-by: martinpkr <[email protected]>
  • Loading branch information
martinpkr committed Jun 2, 2024
1 parent c1ff8b6 commit a803cd7
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,9 @@ public PlainActionFuture<WorkflowData> execute(

String sourceIndices = (String) inputs.get(SOURCE_INDEX);
String destinationIndex = (String) inputs.get(DESTINATION_INDEX);
Boolean refresh = inputs.containsKey(REFRESH) ? Booleans.parseBoolean(inputs.get(REFRESH).toString()) : null;
Float requestsPerSecond = inputs.containsKey(REQUESTS_PER_SECOND)
? Float.parseFloat(inputs.get(REQUESTS_PER_SECOND).toString())
: null;
Boolean requireAlias = inputs.containsKey(REQUIRE_ALIAS) ? Booleans.parseBoolean(inputs.get(REQUIRE_ALIAS).toString()) : null;
Boolean refresh = ParseUtils.parseIfExists(inputs, REFRESH, Boolean.class);
Float requestsPerSecond = ParseUtils.parseIfExists(inputs, REQUESTS_PER_SECOND, Float.class);
Boolean requireAlias = ParseUtils.parseIfExists(inputs, REQUIRE_ALIAS, Boolean.class);
Integer slices = (Integer) inputs.get(SLICES);
Integer maxDocs = (Integer) inputs.get(MAX_DOCS);

Expand Down

0 comments on commit a803cd7

Please sign in to comment.