@@ -491,6 +491,7 @@ async def save_objects(
491
491
self ,
492
492
index_name : str ,
493
493
objects : List [Dict [str , Any ]],
494
+ wait_for_tasks : bool = False ,
494
495
request_options : Optional [Union [dict , RequestOptions ]] = None ,
495
496
) -> List [BatchResponse ]:
496
497
"""
@@ -500,13 +501,15 @@ async def save_objects(
500
501
index_name = index_name ,
501
502
objects = objects ,
502
503
action = Action .ADDOBJECT ,
504
+ wait_for_tasks = wait_for_tasks ,
503
505
request_options = request_options ,
504
506
)
505
507
506
508
async def delete_objects (
507
509
self ,
508
510
index_name : str ,
509
511
object_ids : List [str ],
512
+ wait_for_tasks : bool = False ,
510
513
request_options : Optional [Union [dict , RequestOptions ]] = None ,
511
514
) -> List [BatchResponse ]:
512
515
"""
@@ -516,6 +519,7 @@ async def delete_objects(
516
519
index_name = index_name ,
517
520
objects = [{"objectID" : id } for id in object_ids ],
518
521
action = Action .DELETEOBJECT ,
522
+ wait_for_tasks = wait_for_tasks ,
519
523
request_options = request_options ,
520
524
)
521
525
@@ -524,6 +528,7 @@ async def partial_update_objects(
524
528
index_name : str ,
525
529
objects : List [Dict [str , Any ]],
526
530
create_if_not_exists : bool = False ,
531
+ wait_for_tasks : bool = False ,
527
532
request_options : Optional [Union [dict , RequestOptions ]] = None ,
528
533
) -> List [BatchResponse ]:
529
534
"""
@@ -535,6 +540,7 @@ async def partial_update_objects(
535
540
action = Action .PARTIALUPDATEOBJECT
536
541
if create_if_not_exists
537
542
else Action .PARTIALUPDATEOBJECTNOCREATE ,
543
+ wait_for_tasks = wait_for_tasks ,
538
544
request_options = request_options ,
539
545
)
540
546
@@ -5494,6 +5500,7 @@ def save_objects(
5494
5500
self ,
5495
5501
index_name : str ,
5496
5502
objects : List [Dict [str , Any ]],
5503
+ wait_for_tasks : bool = False ,
5497
5504
request_options : Optional [Union [dict , RequestOptions ]] = None ,
5498
5505
) -> List [BatchResponse ]:
5499
5506
"""
@@ -5503,13 +5510,15 @@ def save_objects(
5503
5510
index_name = index_name ,
5504
5511
objects = objects ,
5505
5512
action = Action .ADDOBJECT ,
5513
+ wait_for_tasks = wait_for_tasks ,
5506
5514
request_options = request_options ,
5507
5515
)
5508
5516
5509
5517
def delete_objects (
5510
5518
self ,
5511
5519
index_name : str ,
5512
5520
object_ids : List [str ],
5521
+ wait_for_tasks : bool = False ,
5513
5522
request_options : Optional [Union [dict , RequestOptions ]] = None ,
5514
5523
) -> List [BatchResponse ]:
5515
5524
"""
@@ -5519,6 +5528,7 @@ def delete_objects(
5519
5528
index_name = index_name ,
5520
5529
objects = [{"objectID" : id } for id in object_ids ],
5521
5530
action = Action .DELETEOBJECT ,
5531
+ wait_for_tasks = wait_for_tasks ,
5522
5532
request_options = request_options ,
5523
5533
)
5524
5534
@@ -5527,6 +5537,7 @@ def partial_update_objects(
5527
5537
index_name : str ,
5528
5538
objects : List [Dict [str , Any ]],
5529
5539
create_if_not_exists : bool = False ,
5540
+ wait_for_tasks : bool = False ,
5530
5541
request_options : Optional [Union [dict , RequestOptions ]] = None ,
5531
5542
) -> List [BatchResponse ]:
5532
5543
"""
@@ -5538,6 +5549,7 @@ def partial_update_objects(
5538
5549
action = Action .PARTIALUPDATEOBJECT
5539
5550
if create_if_not_exists
5540
5551
else Action .PARTIALUPDATEOBJECTNOCREATE ,
5552
+ wait_for_tasks = wait_for_tasks ,
5541
5553
request_options = request_options ,
5542
5554
)
5543
5555
0 commit comments