From 228f9fd570de19eb5724dd6a8c1e3f30ac28f75b Mon Sep 17 00:00:00 2001 From: SimonThordal Date: Thu, 18 Jul 2024 17:12:33 +0200 Subject: [PATCH] retry on 429 --- yente/provider/opensearch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yente/provider/opensearch.py b/yente/provider/opensearch.py index bda47ba3..6e3d94a8 100644 --- a/yente/provider/opensearch.py +++ b/yente/provider/opensearch.py @@ -228,6 +228,8 @@ async def bulk_index(self, entities: AsyncIterator[Dict[str, Any]]) -> None: chunk_size=1000, yield_ok=False, stats_only=True, + max_retries=3, + initial_backoff=2, ) except BulkIndexError as exc: raise YenteIndexError(f"Could not index entities: {exc}") from exc