Skip to content

Commit

Permalink
break from loop
Browse files Browse the repository at this point in the history
  • Loading branch information
anshbansal committed Nov 6, 2024
1 parent 69e7893 commit a4541fd
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,19 @@ def cleanup_soft_deleted_entities(self) -> None:
self.report.num_soft_deleted_entity_removed
<= self.config.limit_entities_delete
):
urns = self.ctx.graph.get_urns_by_filter(
entity_types=self.config.entity_types,
platform=self.config.platform,
env=self.config.env,
query=self.config.query,
status=RemovedStatusFilter.ONLY_SOFT_DELETED,
batch_size=self.config.batch_size,
urns = list(
self.ctx.graph.get_urns_by_filter(
entity_types=self.config.entity_types,
platform=self.config.platform,
env=self.config.env,
query=self.config.query,
status=RemovedStatusFilter.ONLY_SOFT_DELETED,
batch_size=self.config.batch_size,
)
)
if len(urns) == 0:
logger.info("No more urns found")
return

futures = {}
with ThreadPoolExecutor(max_workers=self.config.max_workers) as executor:
Expand Down

0 comments on commit a4541fd

Please sign in to comment.