Skip to content

Commit 950c8aa

Browse files
author
Harinath
committed
updated chunk size.
1 parent df886d0 commit 950c8aa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pydanticrud/backends/dynamodb.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,10 +423,9 @@ def batch_save(self, items: list) -> dict:
423423
# Prepare the batch write requests
424424
request_items = {self.table_name: []}
425425

426-
# chunk list for size limit of 25 items to write using this batch_write operation refer below.However
427-
# we are just trying with 20 items.
426+
# chunk list for size limit of 25 items to write using this batch_write operation refer below.
428427
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb/client/batch_write_item.html#:~:text=The%20BatchWriteItem%20operation,Data%20Types.
429-
for chunk in chunk_list(items, 20):
428+
for chunk in chunk_list(items, 25):
430429
serialized_items = [self.serializer.serialize_record(item.dict(by_alias=True)) for item in chunk]
431430
for serialized_item in serialized_items:
432431
request_items[self.table_name].append({"PutRequest": {"Item": serialized_item}

0 commit comments

Comments
 (0)