From 80727ff0307ea8b08e76ec2f19695a6a7e6d9fa7 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Wed, 8 Jan 2025 13:41:10 +0100 Subject: [PATCH] chore(deployer): use streaming_bulk() --- deployer/src/deployer/search/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/deployer/src/deployer/search/__init__.py b/deployer/src/deployer/search/__init__.py index 54d009846107..f0e82cb89e1a 100644 --- a/deployer/src/deployer/search/__init__.py +++ b/deployer/src/deployer/search/__init__.py @@ -5,7 +5,7 @@ from collections import Counter import click -from elasticsearch.helpers import parallel_bulk +from elasticsearch.helpers import streaming_bulk from elasticsearch_dsl import Index from elasticsearch_dsl.connections import connections from selectolax.parser import HTMLParser @@ -90,10 +90,9 @@ def get_progressbar(): errors_counter = Counter() t0 = time.time() with get_progressbar() as bar: - for success, info in parallel_bulk( + for success, info in streaming_bulk( connection, generator(), - thread_count=1, # If the bulk indexing failed, it will by default raise a BulkIndexError. # Setting this to 'False' will suppress that. raise_on_exception=False,