Skip to content

Commit

Permalink
Merge pull request #485 from opensanctions/add-retries
Browse files Browse the repository at this point in the history
retry on 429
  • Loading branch information
pudo authored Jul 20, 2024
2 parents 24c4c04 + 228f9fd commit 387cc6e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions yente/provider/opensearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 387cc6e

Please sign in to comment.