Skip to content

Commit

Permalink
apply spotless add comment
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Flores <[email protected]>
  • Loading branch information
brianf-aws committed Feb 10, 2025
1 parent 95ecd22 commit 6b193be
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,16 @@ private void undeployModels(
*/
boolean modelNotFoundInNodesCache = response.getNodes().stream().allMatch(nodeResponse -> {
Map<String, String> status = nodeResponse.getModelUndeployStatus();
if (status == null) return false;
boolean modelCacheMissForModelIds = Arrays.stream(modelIds).allMatch(modelId -> {
if (status == null)
return false;
// Stream is used to catch all models edge case but only one is ever undeployed
boolean modelCacheMissForModelIds = Arrays.stream(modelIds).allMatch(modelId -> {
String modelStatus = status.get(modelId);
return modelStatus != null && modelStatus.equalsIgnoreCase(NOT_FOUND);
});

return modelCacheMissForModelIds;
} );
});
if (response.getNodes().isEmpty() || modelNotFoundInNodesCache) {
bulkSetModelIndexToUndeploy(modelIds, listener, response);
return;
Expand Down

0 comments on commit 6b193be

Please sign in to comment.