mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-09 12:30:49 +02:00
Add basic retries to Vespa insert calls
This commit is contained in:
parent
dcbb7b85d9
commit
c9edc2711c
@ -13,6 +13,7 @@ from typing import cast
|
||||
import requests
|
||||
from requests import HTTPError
|
||||
from requests import Response
|
||||
from retry import retry
|
||||
|
||||
from danswer.chunking.models import DocMetadataAwareIndexChunk
|
||||
from danswer.chunking.models import InferenceChunk
|
||||
@ -147,6 +148,7 @@ def _delete_vespa_doc_chunks(document_id: str) -> bool:
|
||||
return not any(failures)
|
||||
|
||||
|
||||
@retry(tries=3, delay=1, backoff=2)
|
||||
def _index_vespa_chunk(
|
||||
chunk: DocMetadataAwareIndexChunk, already_existing_documents: set[str]
|
||||
) -> bool:
|
||||
|
Loading…
x
Reference in New Issue
Block a user