Skip to content

Commit

Permalink
Add aspect type filter to metadata sync
Browse files Browse the repository at this point in the history
  • Loading branch information
treff7es committed Oct 29, 2024
1 parent cf62ef5 commit 98ad801
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class MetadataChangeEmitterConfig(BaseModel):
aspects_to_exclude: Optional[List]
entity_type_to_exclude: Optional[List] = Field(default_factory=list)
extra_headers: Optional[Dict[str, str]]
enable_soft_delete_filter: Optional[bool] = True


class MetadataChangeSyncAction(Action):
Expand Down Expand Up @@ -80,10 +79,8 @@ def act(self, event: EventEnvelope) -> None:
if event.event_type is METADATA_CHANGE_LOG_EVENT_V1_TYPE:
orig_event = cast(MetadataChangeLogClass, event.event)
logger.debug(f"received orig_event {orig_event}")
if (
orig_event.get("aspectName") not in self.aspects_exclude_set
and orig_event.get("entityType")
not in self.config.entity_type_to_exclude
if (orig_event.get("aspectName") not in self.aspects_exclude_set) and (
orig_event.get("entityType") not in self.config.entity_type_to_exclude
):
mcp = self.buildMcp(orig_event)
if mcp is not None:
Expand Down

0 comments on commit 98ad801

Please sign in to comment.