Skip to content

Commit

Permalink
Default batch size (#13)
Browse files Browse the repository at this point in the history

---------

Co-authored-by: Hassan Syyid <[email protected]>
  • Loading branch information
xacadil and hsyyid authored Apr 4, 2024
1 parent 48860e1 commit eb70160
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion target_api/sinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ class BatchSink(ApiSink, HotglueBatchSink):
@property
def max_size(self):
if self.config.get("process_as_batch"):
return int(self.config.get("batch_size", 1))
batch_size = self.config.get("batch_size", 100)
if batch_size:
return int(batch_size)
return 100

def process_batch_record(self, record: dict, index: int) -> dict:
if self.config.get("add_stream_key"):
Expand Down

0 comments on commit eb70160

Please sign in to comment.