Skip to content

Commit

Permalink
fix(ingest/gc): fix logging (#12348)
Browse files Browse the repository at this point in the history
  • Loading branch information
anshbansal authored Jan 15, 2025
1 parent 3905c8e commit b015fd2
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class SoftDeletedEntitiesCleanupConfig(ConfigModel):

@dataclass
class SoftDeletedEntitiesReport(SourceReport):
num_queries_found: int = 0
num_entities_found: Dict[str, int] = field(default_factory=dict)
num_soft_deleted_entity_processed: int = 0
num_soft_deleted_retained_due_to_age: int = 0
num_soft_deleted_entity_removal_started: int = 0
Expand Down Expand Up @@ -277,7 +277,11 @@ def _get_soft_deleted(self, graphql_query: str, entity_type: str) -> Iterable[st
# We make the batch size = config after call has succeeded once
batch_size = self.config.batch_size
scroll_id = scroll_across_entities.get("nextScrollId")
self.report.num_queries_found += scroll_across_entities.get("count")
if entity_type not in self.report.num_entities_found:
self.report.num_entities_found[entity_type] = 0
self.report.num_entities_found[entity_type] += scroll_across_entities.get(
"count"
)
for query in scroll_across_entities.get("searchResults"):
yield query["entity"]["urn"]

Expand Down

0 comments on commit b015fd2

Please sign in to comment.