mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-27 01:45:32 +00:00
Ignore Entity No Change Events (#17087)
This commit is contained in:
parent
ebdd7f7fd9
commit
28218ec612
@ -22,6 +22,7 @@ import javax.ws.rs.core.SecurityContext;
|
|||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.openmetadata.schema.type.ChangeEvent;
|
import org.openmetadata.schema.type.ChangeEvent;
|
||||||
|
import org.openmetadata.schema.type.EventType;
|
||||||
import org.openmetadata.service.Entity;
|
import org.openmetadata.service.Entity;
|
||||||
import org.openmetadata.service.OpenMetadataApplicationConfig;
|
import org.openmetadata.service.OpenMetadataApplicationConfig;
|
||||||
import org.openmetadata.service.util.JsonUtils;
|
import org.openmetadata.service.util.JsonUtils;
|
||||||
@ -71,9 +72,11 @@ public class ChangeEventHandler implements EventHandler {
|
|||||||
changeEvent.setEntity(JsonUtils.pojoToMaskedJson(entity));
|
changeEvent.setEntity(JsonUtils.pojoToMaskedJson(entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Thread are created in FeedRepository Directly
|
// Insert ChangeEvents if ENTITY Changed
|
||||||
|
if (!changeEvent.getEventType().equals(EventType.ENTITY_NO_CHANGE)) {
|
||||||
Entity.getCollectionDAO().changeEventDAO().insert(JsonUtils.pojoToJson(changeEvent));
|
Entity.getCollectionDAO().changeEventDAO().insert(JsonUtils.pojoToJson(changeEvent));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error(
|
LOG.error(
|
||||||
"Failed to capture the change event for method {} due to ",
|
"Failed to capture the change event for method {} due to ",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user