mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-09 09:38:22 +00:00
parent
f3f45bc174
commit
2b0aeaf0eb
@ -84,6 +84,13 @@ public class ChangeEventHandler implements EventHandler {
|
||||
// Add a new thread to the entity for every change event
|
||||
// for the event to appear in activity feeds
|
||||
if (Entity.shouldDisplayEntityChangeOnFeed(changeEvent.getEntityType())) {
|
||||
// ignore usageSummary updates in the feed
|
||||
boolean shouldIgnore = false;
|
||||
if (Entity.TABLE.equals(changeEvent.getEntityType()) && changeEvent.getChangeDescription() != null) {
|
||||
List<FieldChange> fields = changeEvent.getChangeDescription().getFieldsUpdated();
|
||||
shouldIgnore = fields.stream().anyMatch(field -> field.getName().equals("usageSummary"));
|
||||
}
|
||||
if (!shouldIgnore) {
|
||||
for (var thread : listOrEmpty(getThreads(responseContext, loggedInUserName))) {
|
||||
// Don't create a thread if there is no message
|
||||
if (!thread.getMessage().isEmpty()) {
|
||||
@ -109,6 +116,7 @@ public class ChangeEventHandler implements EventHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.error("Failed to capture change event for method {} due to ", method, e);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user