Skip to content

Commit f300579

Browse files
fix: compute budget delay after decrementing quota counter
Co-Authored-By: Daryna Ishchenko <darina.ishchenko17@gmail.com>
1 parent b66f3aa commit f300579

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

airbyte_cdk/sources/declarative/auth/rate_limited_multiple_token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ def _acquire_call(self, quota: TokenQuota) -> str:
171171
token = self._active_token
172172
state = self._states[token][quota.name]
173173
if state.remaining > 0:
174-
budget_delay = self._compute_budget_delay(quota)
175174
state.remaining -= 1
175+
budget_delay = self._compute_budget_delay(quota)
176176
elif all(self._states[token][quota.name].remaining <= 0 for token in self._tokens):
177177
min_time_to_wait = min(
178178
(

0 commit comments

Comments
 (0)