Skip to content

Commit

Permalink
DG-1697: Adding endpoint for linking/unlink policy
Browse files Browse the repository at this point in the history
  • Loading branch information
arpit-at committed Jul 12, 2024
1 parent 8241f31 commit 861d095
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
import javax.inject.Inject;
import java.io.InputStream;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;

import static java.lang.Boolean.FALSE;
Expand Down Expand Up @@ -2748,7 +2749,15 @@ public void linkBusinessPolicy(String guid, List<String> linkGuids) throws Atlas
aeh = entityRetriever.toAtlasEntityHeader(v);
entityMutationResponse.addEntity(UPDATE, aeh);
}
entityChangeNotifier.onEntitiesMutated(entityMutationResponse, false);
// Send notifications for the entity changes asynchronously
CompletableFuture.runAsync(() -> {
try {
entityChangeNotifier.onEntitiesMutated(entityMutationResponse, false);
} catch (AtlasBaseException e) {
// Handle exception
LOG.error("Error in processing notification for policy link updates for asset ids {} ", linkGuids, e);
}
});
RequestContext.get().endMetricRecord(metric);
}

Expand Down

0 comments on commit 861d095

Please sign in to comment.