Skip to content

Commit

Permalink
CDK: increase maximum_attempts_to_acquire to avoid crashing in acqu…
Browse files Browse the repository at this point in the history
…ire_call (#32516)

Co-authored-by: Eugene Kulak <kulak.eugene@gmail.com>
  • Loading branch information
keu and eugene-kulak authored Nov 14, 2023
1 parent ef95ef6 commit 203e01e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions airbyte-cdk/python/airbyte_cdk/sources/streams/call_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,12 @@ def update_from_response(self, request: Any, response: Any) -> None:
class APIBudget(AbstractAPIBudget):
"""Default APIBudget implementation"""

def __init__(self, policies: list[AbstractCallRatePolicy], maximum_attempts_to_acquire: int = 10) -> None:
def __init__(self, policies: list[AbstractCallRatePolicy], maximum_attempts_to_acquire: int = 100000) -> None:
"""Constructor
:param policies: list of policies in this budget
:param maximum_attempts_to_acquire: number of attempts before throwing hit ratelimit exception
:param maximum_attempts_to_acquire: number of attempts before throwing hit ratelimit exception, we put some big number here
to avoid situations when many threads compete with each other for a few lots over a significant amount of time
"""

self._policies = policies
Expand Down

0 comments on commit 203e01e

Please sign in to comment.