Skip to content

Commit

Permalink
increasing batch size (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avi-Robusta authored Jul 24, 2024
1 parent 77c8c61 commit d2b63de
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import asyncio
import logging
import os
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime, timedelta
from typing import Iterable, List, Optional, Dict, Any
Expand Down Expand Up @@ -314,7 +315,8 @@ async def load_pods(self, object: K8sObjectData, period: timedelta) -> list[PodD
pod_owner_kind = object.kind

related_pods_result = []
for owner_group in batched(pod_owners, 10):
batch_size = int(os.environ.get("KRR_OWNER_BATCH_SIZE", 100))
for owner_group in batched(pod_owners, batch_size):
owners_regex = "|".join(owner_group)
related_pods_result_item = await self.query(
f"""
Expand Down

0 comments on commit d2b63de

Please sign in to comment.