File tree Expand file tree Collapse file tree 3 files changed +86
-143
lines changed Expand file tree Collapse file tree 3 files changed +86
-143
lines changed Original file line number Diff line number Diff line change @@ -416,15 +416,15 @@ def delete(self, key):
416416 def batch_save (self , items : list ) -> dict :
417417 """
418418 This function is to write multiple records in to dynamodb and returns unprocessed records in dict
419- if something gone wrong with the record.This will by default try 3 time if any unprocessed
420- records exists in result. Currently, batch_write is not supporting ConditionExpression
419+ if something gone wrong with the record.Currently, batch_write is not supporting ConditionExpression
421420 Refer docs:
422421 https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb/client/batch_write_item.html
423422 """
424423 # Prepare the batch write requests
425424 request_items = {self .table_name : []}
426425
427- # chunk list for size limit of 25 items to write using this batch_write operation refer below.
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.
428428 # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb/client/batch_write_item.html#:~:text=The%20BatchWriteItem%20operation,Data%20Types.
429429 for chunk in chunk_list (items , 20 ):
430430 serialized_items = [self .serializer .serialize_record (item .dict (by_alias = True )) for item in chunk ]
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def random_datetime():
1515 random .randint (1 , 28 ),
1616 random .randint (1 , 12 ),
1717 random .randint (1 , 59 ),
18- 0 ,
18+ 0
1919 )
2020
2121
You can’t perform that action at this time.
0 commit comments