Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions semanticscholar/ApiRequester.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

import httpx
from tenacity import retry as rerun
from tenacity import retry_if_exception_type, stop_after_attempt, wait_fixed
from tenacity import retry_if_exception_type, \
stop_after_attempt, \
wait_exponential

from semanticscholar.SemanticScholarException import (
BadQueryParametersException, GatewayTimeoutException,
Expand Down Expand Up @@ -94,7 +96,7 @@ async def get_data_async(
)(self, url, parameters, headers, payload)

@rerun(
wait=wait_fixed(30),
wait=wait_exponential(min=5),
retry=retry_if_exception_type(ConnectionRefusedError),
stop=stop_after_attempt(10)
)
Expand Down
Loading